A studying web app which generates questions & summarize reading material for users using NLP (Work in Progress Lol).
Frontend: React + TypeScript Backend: - (REST Api) Gin-Gonic + Go - (NLP Consumer) Python - (Message Queue) RabbitMQ - (Database) Postgres
-
Make sure you get the firebase & http credentials from Ramko9999
docker pull postgres
docker pull rabbitmq
- Create a .env file in ./server. Put a password for the Postgres instance as follows in the .env file:
PASSWORD=...
- Run the docker-compose.yaml file from ./server
docker compose up -d
docker ps # verify containers are running
- Go into postgres container with the following command and create 2 databases (recap_db & recap_db_test)
docker exec -it <postgres-container-id> psql -U postgres
postgres=# CREATE DATABASE recap_db;
postgres=# CREATE DATABASE recap_db_test;
recap_db
will be the local development database and recap_db_test
will be database when running tests.
GORM will take care of creating schema.
Create a .env file in ./server/gin. This file will contain the Postgres instance credentials. Here is what should be in it:
PORT=...
HOST=...
NAME=recap_db
USER=...
PASSWORD=...
SSL_MODE=disable
TEST_PORT=...
TEST_HOST=...
TEST_NAME=recap_db_test
TEST_USER=...
TEST_PASSWORD=...
TEST_SSL_MODE=disable
- Ensure you have firebase.json (firebase project credentials)
Simply run npm start
from root directory.
Navigate into ./client and run npm start
Navigate into ./server/gin and run go run main.go
Don't have testing setup yet
Navigate into ./server/gin and run go test
or for more verbosity go test -v