Skip to content

About

Use -> Username: Mahim Ismail - password:mahim321 for accessing the admin page [May take upto a min to start the app]

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Metrorail Project

This project is a Spring Boot application for the Metrorail system, featuring a web interface for ticket purchasing, admin management, and automated database initialization.

Installation Options

You can choose between running the project using Docker (recommended) or setting it up manually.

Option 1: Docker (Recommended)

This is the easiest way to run the project. It automatically sets up both the Spring Boot application and the MySQL database in containers.

Prerequisites:

Steps:

  1. Open a terminal in the project root folder.
  2. Run the following command:
    docker-compose up --build
  3. Access the application at: http://localhost:8080

Option 2: Manual Installation

Use this option if you want to run the application directly on your machine.

Prerequisites:

  1. Java 17 (JDK): Ensure Java 17 is installed.
    • Verify with: java -version
  2. MySQL Server: Ensure MySQL is installed and running.
    • Create a database named test2.
    • Default credentials: root / 1234.

Steps:

  1. Open a terminal in the project folder.
  2. Build and run using the Maven wrapper:
    .\mvnw spring-boot:run
  3. Access the application at: http://localhost:8080

Default Showcase Users

The application initializes with two primary accounts for demonstration:

Role Username Password
Admin Mahim Ismail mahim321
User Dummy User password
  • Admin Account: Has full access to the Admin Dashboard (/admin/system).
  • Gifting Feature: You can showcase ticket gifting between these two accounts.

Configuration

If your local MySQL setup differs from the defaults, you can override settings using environment variables:

  • DB_URL: Database URL (default: jdbc:mysql://localhost:3306/test2)
  • DB_USERNAME: Database username (default: root)
  • DB_PASSWORD: Database password (default: 1234)

Example (Windows PowerShell):

$env:DB_PASSWORD="your_password"; .\mvnw spring-boot:run

Screenshots

License

This project is licensed under the MIT License.

About

Use -> Username: Mahim Ismail - password:mahim321 for accessing the admin page [May take upto a min to start the app]

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages