The app can do the following tasks
- Company (Provider) can register as charger provider
- Company (Provider) can create their chargers and price
- User can register using phone number
- User can book charger
- User can view booking history
- User pay when booking end (using stripe)
Requirement:
- REST api with swagger
- Unit testing / Integration testing
- Proper authorization for company/user
- Install dependencies
yarn install
- Run dev
yarn dev
- Run test
yarn test
- __test__: Contains all the testing cases for all endpoints
- config: Contains config files for server, database and stripe (ignored)
- controllers: controller files for providers, users and chargers
- database/transaction: Contains mongoDB transaction
- mock: mock data for testing
- models: MongoDB models of users, chargers and providers
- routes: basic app routes
- types
- utils
To run this project, you will need to add the following environment variables to your .env file
PORT
MONGO_URI
JWT
STRIPE_SECRET
STRIPE_PUBLIC_KEY
NODE_ENV