thingaha / thingaha-web

Web Application for Thingaha Donation Management
9 stars 27 forks source link
hacktoberfest thingaha-donation

Thingaha Donation Project

thingaha-web is a web application to make life easier for thingaha donation group monthly donation data tracking and workflows.

For project background and current goals for v1.0, please read the Wiki Home Page.

Backend

Pre-requisite

  1. Flask with python3
  2. PostgreSQL == 12.3

Environment setup

Docker based setup

Native env setup using Anaconda

Create virtual environment
conda create -n <envname>
conda activate <envname>
pip install -r ~/thingaha/backend/requirements.txt

create table and insert data to table

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]

for linux, macOS -> go backend/bin and run -> ./db_seed.sh
for windows -> go to backend\bin and run -> db_seed.bat

#memo
Put all testing data to DB

alt text

for linux, macOS -> go backend/bin and run -> ./start_app.sh
for windows -> go to backend\bin and run -> start_app.bat
- 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
for linux, macOS -> go backend/bin and run -> ./start_test.sh
for windows -> go to backend\bin and run -> start_test.bat

Frontend

This project was bootstrapped with Create React App.

Main UI framework is Material UI. For component styling, styled-components is used.

Pre-requisite

Getting Started

For Myanmar language Search

Check your local language in terminal

locale

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
export LC_ALL=en_US.UTF-8  
export LANG=en_US.UTF-8
brew services list 
brew services restart postgresql@12
CREATE DATABASE db_test WITH TEMPLATE = templateUTF_8 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = '
en_US.UTF-8';
CREATE DATABASE thingaha_dev 
WITH OWNER = XXXX 
TEMPLATE = templateUTF_8 
ENCODING = 'UTF8' 
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8' 
TABLESPACE = pg_default 
CONNECTION LIMIT = -1;