Skip to content

Application for the Queen's Psychology Clinic to manage their materials

License

Notifications You must be signed in to change notification settings

queens-psyc-clinic/app

Repository files navigation

Deployment

NOTE: if you are having issues building or up-ing a docker-compose file use the command docker compose [-f ...] down and try again.

To deploy the application, first ensure that:

  1. the app/.env file has the correct credentials
  2. the REACT_APP_BASE_URL in client/.env is set to the correct url (ie. localhost/api)

Once this is done, the app can be deployed (on localhost) by using:

docker compose -f docker-compose.deploy.yml build # if not already done
docker compose -f docker-compose.deploy.yml up

Testing

For testing the application (like for reviewing someone's PR) use the following:

docker compose -f docker-compose.test.yml build
docker compose -f docker-compose.test.yml up

Development

Client

The react development server can be started from the client/ directory using:

npm start

Note: you will have to use npm install if not already done.

The server will then be running on localhost:3000.

Note: ensure you have the correct REACT_APP_BASE_URL in client/.env as this correcponds to the URL used to connect the to App (Backend).

App

This app is containerized using Docker to make deployment & development straightforward.

To run the app, use the command:

docker compose up

And if you have made any changes to the code and need to check your changes, use:

docker compose build

And then use the docker compose up command.

Note: the App (flask server) has hot-reloading enabled and should not need to be restarted when changes are made.

The configuration (DockerFile)of the docker containers are in db and app, and the config for the entire application is docker-compose.yml

API Docs

to view the Backend api, go to http://localhost:5050/apidocs. This is created using flasgger.

The documentation is created from the doc-strings of functions in resources.

Resources is where the endpoints are described.

Database

Once the app is running, there is an Admin Console for the database at:

localhost:8080

and you can login with:

UserName: dev
Password: 498capstone
Database: psychClinic

CSV Data

Data recieved from the clinic was converted into a CSV file which is then processed by clean_data.py

About

Application for the Queen's Psychology Clinic to manage their materials

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published