TAF is a website for babysitters and parents to meet and schedule with each other for happier parents and happier babysitters
This repo is for openu course 20995 learning how to build web application in the cloud ☁️☁️☁️
and some important tools we are working with linter & pre-commit
First of all copy the value of the LOCATION_API_KEY
sent to you and save it in a file called .env
at the repo root (where README is at)
LOCATION_API_KEY = shhhhhhh!
then run the python code to setup the .env:
python3 setup-env.py
then start the magic
export DB_PASSWORD=1234
docker-compose up
IF YOU HAVE WINDOWS LOOK HERE!
$Env:DB_PASSWORD=1234
docker-compose up
or you can use:
make up
IF YOU USE PGAdmin Please Refer to docs
-
Backend -> nodejs
-
Frontend -> reactJS
-
Database -> postgresql
-
Orchestration -> Docker-compose
-
Continuos Integration -> GitHub Actions
NodeJS
-> here
ReactJS
-> You Need to install node silly
Postgresql
-> here
Docker
-> not here
We use eslint which is really good and easy to use 🚀
For installation run:
npm install eslint --save-dev
And then run:
npx eslint .
Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks. read-more
Mac/Linux:
pip install pre-commit
pre-commit --version
pre-commit install
pre-commit run --all-files
From the repo root run:
npm install
To work locally, if you get errors try:
npm install express --save
With Docker:
docker compose up
If the images are missing it will build them before, for building run:
docker compose build
We use Puppeteer for frontend testing and Node-Fetch for backend testing.
You can see the test suite in tests
-
api-test.js
-> testing the api for simple calls and validation -
browser-test.js
-> testing all front public pages -
login-test.js
-> signup and loging for both parent and babysitter
if you add:
export TEST_NON_EXISTS=1
before running api-test.js it will test non existing users as well
all test running in github action after a pr is created following by a linter check.