thingaha-web is a web application to make life easier for thingaha donation group monthly donation data tracking and workflows.
- Flask with python3
- PostgreSQL == 12.3
- install anaconda from anaconda webpage
- install pgadmin4 (optional)
- create the database with username,password in conf_dev, conf_test
conda create -n <envname>
conda activate <envname>
pip install -r ~/thingaha/backend/requirements.txt
- DB migrate
for linux, macOS -> go backend/bin and run -> ./db_migrate.sh
for windows -> go to backend\bin and run -> db_migrate.bat
#memo
postgres url be like [DB_TYPE]+[DB_CONNECTOR]://[USERNAME]:[PASSWORD]@[HOST]:[PORT]/[DB_NAME]
- DB Seed
for linux, macOS -> go backend/bin and run -> ./db_seed.sh
for windows -> go to backend\bin and run -> db_seed.bat
- ERD Diagram for Thingaha Project
- Start the server
for linux, macOS -> go backend/bin and run -> ./start_app.sh
for windows -> go to backend\bin and run -> start_app.bat
- Start using API
- Default server port is 5000:
- All API required JWT token for access data
- Get the access token from login.
-- init user_email: moemoe@gmail.com
-- init user_pass: 123
-- login URL : =>
-- [POST] http://localhost:5000/api/v1/login
- API docs can be found in https://github.com/thingaha/thingaha-web/tree/master/backend/docs
- Start the test case
for linux, macOS -> go backend/bin and run -> ./start_test.sh
for windows -> go to backend\bin and run -> start_test.bat
- For the Postman user, please import bin/db_seed/thingaha.postman_collection.json for API testing
This project was bootstrapped with Create React App.
Main UI framework is Material UI. For component styling, styled-components is used.
- First, install tools listed in pre-requisite section.
- Then, set up the draft api server. We're using a draft api server with canned response before backend is ready
- To set up draft api server,
cd
into thedraft_server
directory and install necessary node modules by runningyarn install
. - Then, run
yarn start
- The draft server is configured to run on port
9000
. Try navigating to http://localhost:9000/users to see if draft server is working properly.
- To set up draft api server,
- Then set up the frontend app.
- To set up frontend dev server,
cd
into thefrontend
directory and install necessary node modules by runningyarn install
. - Then, run
yarn start
- The frontend dev server is configured to run on port
5001
. Try navigating to http://localhost:5001/ to see the app in action.
- To set up frontend dev server,