Frontend - React with Vite and Typescript
Backend - Express with Typescript, Prisma and Docker
- 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
You need Node.js and Docker installed on your machine.
Position yourself in /backend folder.
- Install packages
yarn install
- 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
- Apply migrations
npx prisma migrate dev
- Seed database
npx prisma db seed
- Run backend
yarn dev
Position yourself in /frontend folder.
- Install packages
yarn install
- Run frontend
yarn dev
Login with user credentials
- Email: [email protected]
- Password: abb