Bus Tickets System

Frontend - React with Vite and Typescript

Backend - Express with Typescript, Prisma and Docker

App TODO list

  • Unregistered user can view route tickets but cannot buy them without registration
  • User needs to provider credit card number when purchasing ticket
  • User can buy only one card in single transaction
  • User can view list of bought tickets
  • User can cancel ticket max. 1 hour before ride starts
  • Login button + login modal
  • Register button + register modal
  • Logout button + logout confirm modal

Running app

You need Node.js and Docker installed on your machine.

Backend

Position yourself in /backend folder.

  1. Install packages
yarn install
  1. Starting postgres DB
docker run -d \
    --name pg \
    -p 5432:5432 \
    -e POSTGRES_PASSWORD=postgres \
    -e POSTGRES_USER=postgres \
    -e POSTGRES_DB=bus-tickets-db \
    postgres
  1. Apply migrations
npx prisma migrate dev
  1. Seed database
npx prisma db seed
  1. Run backend
yarn dev

Frontend

Position yourself in /frontend folder.

  1. Install packages
yarn install
  1. Run frontend
yarn dev

Login with user credentials