Coder Social home page Coder Social logo

brianwachira / aata Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.29 MB

Home Page: https://access-afya-analytics.herokuapp.com/

License: MIT License

TypeScript 63.48% HTML 1.20% JavaScript 32.02% SCSS 3.27% Shell 0.02%
assessment-project graphql apollo-server apollo-client reactjs

aata's Introduction

Access Afya Technical Assessment Test Dashboard

This is an analytics dashboard for the measurement and optimization of key metrics that are fundamental for operational efficiency of the healthcare clinics spread country-wide.

screenshot

The project uses Apollo Server + MongoDB for the Backend GraphQL API & ReactJS + Apollo Client for the Frontend.

Built With

Backend

Folder structure

 
└───Controllers
│   └───ExampleController.ts
|    
└───models
|   └───ExampleModel.ts
|
└───Mutations
|   └───ExampleMutation.ts
|
└───queries
|   └───ExampleQuery.ts
|
└───resolvers
|   └───index.ts
|   └───ExampleResolver.ts
|
└───schemas
│   └───index.ts
│   └───ExampleSchema.ts
|
└───graphql.ts
|
└───app.ts
└───index.ts

Frontend

Folder structure

src 
└───Components
│   └───Example
│       │   Example.js
│       │   Example.scss
│   └───Example2
│       │   Example2.js
│       │   Example2.scss
|
└───graphql
|   └───mutations
│   │   |───index.js
|   |
|   └───queries
│       │───index.js
|
|
|
└───Pages
│   └───Example
│       │   
│       └───Example.js
│       │   
│       └───Example.scss
|

Live Demo

DASHBOARD
GRAPHQL API

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

- NodeJS required

Setup


  • Choose AWS provider and any free-tier data center


cluster 1
  • use the database access tab for creating user credentials for the database. Please note that these are not the same credentials you use for logging into MongoDB Atlas. These will be used for your application to connect to the database.


cluster 1
  • grant the user with permissions to read and write to the databases.


cluster 1
  • Define the IP addresses that are allowed access to the database.
    cluster 1

  • For the sake of simplicity we will allow access from all IP addresses:


cluster 1
  • Finally we are ready to connect to our database. Start by clicking connect:


cluster 1
  • Choose Connect your application:


cluster 1
The view displays the MongoDB URI, which is the address of the database that we will supply to the MongoDB client library we will add to our application.
cluster 1
The address looks like this: ```mongodb+srv://:@cluster0-ostce.mongodb.net/?retryWrites=true```
  • Copy the Address
  • Create a .env file in the root of your the backend folder.
  • Use the following syntax to save mongoDB URI as shown in env.example
    MONGODB_URI=MONGODB_URL
    PORT=3001
    SECRET=SECRET_NUMBER
    JWT_SECRET=SECRET_STRING
    
    
  • Replace MONGODB_URL with the address you got from mongoDB cloud atlas
  • Replace SECRET_NUMBER with an integer eg 10 . This will be used when generating a JWT token

Install

  • Navigate to the backend folder cd backend
  • Run npm install . This will install all the dependencies needed for the project
  • Navigate to the frontend folder cd frontend
  • Run npm install . This will install all the dependencies needed for the project

Usage

  • Navigate to the backend folder cd backend
  • Run npm run dev . This will initialize the backend
  • Navigate to the frontend folder cd frontend
  • Run npm start . This will initialize the frontend

Known bugs

  • The database transactions (especially create patient) need to be optimized

commit headers

  • [FEATURE] - New Feature
  • [ENHANCEMENT] - Improvement of an existing feature
  • [FIX] - bug fixes of existing features

Support and contact details

Contact me on [email protected] for any comments, reviews or advice.

License

This project is licensed under the terms of the MIT license.

You can check out the full license here

Copyright (c) Brian Wachira

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.