Git Product home page Git Product logo

charging_app's Introduction

Charging app ๐Ÿ“

The app can do the following tasks

  1. Company (Provider) can register as charger provider
  2. Company (Provider) can create their chargers and price
  3. User can register using phone number
  4. User can book charger
  5. User can view booking history
  6. User pay when booking end (using stripe)

Requirement:

  • REST api with swagger
  • Unit testing / Integration testing
  • Proper authorization for company/user

Get Started ๐Ÿš€

  1. Install dependencies
yarn install
  1. Run dev
yarn dev
  1. Run test
yarn test

Structure folder ๐Ÿ”ฅ

  • __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

Environment Variables

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

charging_app's People

Contributors

nganhavan avatar

Watchers

 avatar

charging_app's Issues

Some initial review

Issues

  • swagger yaml line 711 lacks items definition
  • config/stripe file missing (?)
  • yarn dev doesn't work atm without running build first. Consider adding nodemon config and use "start": "npx nodemon" instead for dev script

Suggestion

Improvement

  • dotenv is not setup (?). At least a .env for local development would be good
  • Bookings of charger can be a separate entity/document, rather than belongs to User

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.