This project is a web app for working with simple e-tickets (six-digit numbers).
The app has such features:
- authenticate by email and password
- issue a new ticket (add an existing ticket or generate a new one)
- find the ticket by its number
- see an info about the ticket
- mark the ticket as used
- delete the ticket
- get the sequence of unique tickets chosen randomly from the list of issued tickets (as for the lottery)
- React (TypeScript)
- effector
- Firebase
- replace callback chains with async/await where it's possible and convenient
- implement a data separation between users
- implement a sign up functionality
You need the Firebase project with such features enabled:
- Email/Password authentication method (with some pre-created users - there's no sign up feature at the moment)
- Firestore (with
tickets
collection - see the document structure in./src/api/tickets/tickets.ts
)
- Install Node.js (≥ 15.13.0)
- Install
yarn
npm package globally - Run
cp ./.env.template ./.env && cp ./.firebaserc.template ./.firebaserc
- Fill in
./.env
file with correct Firebase credentials - Fill in
projects.default
field of./.firebaserc
file with correct Firebase project name - Run
yarn
to install dependencies - Run
yarn start
to run the app in the development mode
- Do steps 1-6 from the previous section
- Run
yarn build
to create the production build - Install
firebase-tools
npm package globally - Run
firebase login
to login to Firebase - Run
firebase deploy
to deploy the app to Firebase