A simple web forum.
Developed by Li Jiakai.
- Demo: https://gossip.kirara.dev/
- User Guide: https://gossip-docs.pages.dev/user-guide/
- Ensure
docker
anddocker compose
are installed.- Refer to the Docker Docs on guides to install Docker and Docker Compose for your system.
- Clone the repository.
git clone https://github.com/jiakai-17/CVWO-Assignment-2024
cd CVWO-Assignment-2024
- Edit the environment variables in the
docker-compose.yml
configuration file.POSTGRES_PASSWORD: YOUR_PASSWORD
: EditYOUR_PASSWORD
to your desired password to access the database.POSTGRES_DB: YOUR_DB
: EditYOUR_DB
to your desired database name.DATABASE_URL: "YOUR_CONNECTION_STRING"
: EditYOUR_CONNECTION_STRING
to your desired connection string. The connection string should be in the format"host=db user=postgres dbname=YOUR_DB password=YOUR_PASSWORD port=5432"
.JWT_SECRETSTRING: "YOUR_JWT_SECRET_STRING"
: EditYOUR_JWT_SECRET_STRING
to your desired secret string used to sign JWT tokens.
- Build and start the application
docker-compose up -d --build
- Access the application at
http://localhost:3000
. - Access the database management interface (adminer) at
http://localhost:8080
. - To stop the application, run
docker-compose down
.
Name | Description | Default value | Required | Example |
---|---|---|---|---|
DATABASE_URL |
The connection string used to connect to the database. | None | Yes | "host=db user=postgres dbname=YOUR_DB password=YOUR_PASSWORD port=5432" |
JWT_SECRETSTRING |
The secret used to sign JWT tokens. | secretstring |
No | "YOUR_JWT_SECRET_STRING" |
BASE_PATH |
The base path of the API. | /api/v1 |
No | "/api/v1" |
Name | Description | Default value | Required | Example |
---|---|---|---|---|
POSTGRES_PASSWORD |
The password used to access the database. | None | Yes | "YOUR_PASSWORD" |
POSTGRES_USER |
The username used to access the database. | postgres |
No | "YOUR_USERNAME" |
POSTGRES_DB |
The name of the database to be created and used for the application. | Same as POSTGRES_USER |
No | "YOUR_DB" |
Refer to the respective README files in the frontend
and backend
directories for development instructions.
This project was developed as part of the CVWO Winter Assignment 2024
The frontend uses React, Material UI, Tailwind CSS and Vite.
The backend is written in Go, with gorilla/mux for routing and sqlc for database access.
The database is PostgreSQL.
The application is containerized using Docker.