lexai/
├── backend/ ← Spring Boot REST API (Java 21)
└── frontend/ ← React + Vite frontend
cd backend
# Set your Gemini API key in src/main/resources/application.properties
mvn spring-boot:run
# API runs on http://localhost:8080
# Swagger UI: http://localhost:8080/swagger-ui/index.htmlcd frontend
npm install
npm run dev
# Runs on http://localhost:3000| Variable | Description |
|---|---|
DB_URL |
PostgreSQL JDBC URL |
DB_USERNAME |
Database username |
DB_PASSWORD |
Database password |
JWT_SECRET |
256-bit hex JWT secret |
JWT_EXPIRATION |
Token expiry in ms (3600000 = 1hr) |
GEMINI_API_KEY |
Google Gemini API key (free at aistudio.google.com) |
PORT |
Server port (Railway sets this automatically) |
- Push to GitHub
- Connect repo to Railway
- Set environment variables in Railway dashboard
- Railway auto-deploys on every push
Backend: Java 21, Spring Boot 3.5, Spring Security, JWT, BCrypt, PostgreSQL, Gemini AI, Swagger
Frontend: React 18, Vite, React Router, Axios
Database: PostgreSQL on Neon.tech
Deployment: Railway (backend), Vercel/Netlify (frontend)
Kavya Agarwal — B.Tech CSE, GLA University (2024-2028)