This project is a backend application built with Java Spring Boot for managing and selling railway tickets.
- Java 17
- Spring Boot
- Spring Security (with JWT)
- Maven
- REST API
- PostgreSQL (assumed from
application.properties)
src/
βββ main/
βββ java/com/example/railway_ticket_backend/
β βββ controller/ # REST API controllers
β βββ service/ # Business logic layer
β βββ entity/ # JPA entities
β βββ repository/ # Spring Data JPA repositories
β βββ dto/ # Data transfer objects
β βββ projection/ # Projections for custom queries
β βββ config/ # JWT and other configurations
β βββ RailwayTicketBackendApplication.java # Entry point
βββ resources/
βββ application.properties
- JWT is used for user authentication.
AuthControllerprovides login and registration endpoints.
AuthControllerβ user login and registrationCoachControllerβ manage coachesStationControllerβ manage stationsTicketControllerβ ticket purchase and retrievalTripControllerβ routes and tripsTripSeatControllerβ seat selection and management
-
Clone the repository:
git clone <repo-url> cd railway_ticket_backend
-
Configure your database settings in
application.properties. -
Run the application:
./mvnw spring-boot:run
- This project includes only the backend services.
- The frontend part is assumed to be a separate module.