Giter VIP home page Giter VIP logo

doctor-case-label's Introduction

Doctor Case Labeling

Technologies/tools used

Prerequisites for running the app locally

  • Unix-like environment (MacOS, Linux, WSL). Windows is not supported
  • node v14.x.y
  • npm >= v7.x.y
  • mongodb running locally

How to run

Seeding data

  • It is highly recommended to seed the sample data by running npm run seed:users and npm run seed:cases from the backend folder

Backend

  • Go to the backend folder and install dependencies (if you haven't already done so) with npm ci
  • Create a .env file inside the backend folder (see .env.example as an example, or for the purposes of this project, rename it to .env)
  • Customize any variables you need in .env
  • Run mongodb on port 27017 (or set MONGODB_URI in .env to customize the connection string)
  • Run npm start

Frontend

  • In another terminal, go to the frontend folder and install dependencies (if you haven't already done so) with npm ci
  • Run npm start
  • Use seed user credentials to log in (username: [email protected] and password: example)

Viewing the API Docs

  • You can view the API docs on /api

Building and running production

  • Run npm run build, you'll see the transpiled output in the dist directory (this works for both backend and frontend apps), you can then serve the output using your deployment configuration
  • For the backend app, you can alternatively just run npm start to run in production mode
  • For the backend app, you can also build a docker image using docker build .

Testing & Coverage

Backend

  • Run npm run test to run tests. npm run test:e2e for e2e tests (you need to have MongoDB running), and npm run test:cov to check code coverage
  • You can find the collected coverage in the generated coverage directory

Config & .env

As previously mentioned, you must have a .env file in the backend folder with the following schema:

# App operating mode, set to 'production' to run in production mode
NODE_ENV=

# Port the application will listen on
PORT=

# Connection URI for the database
MONGODB_URI=

TODO

  • Set up a logger and customize log levels
  • Hash/salt passwords
  • Add client tests
  • UI improvements
  • Health-check endpoint (useful when running in a containerized setup)
  • CI config
  • Development docker-compose config
  • Pre-commit hooks (linting, type-checks)

doctor-case-label's People

Contributors

minaz912 avatar

Watchers

 avatar

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.