This sample CVWO project is written in golang + react. It can be accessed via the Render link or ran locally.
Access the live app (frontend) at: https://cvwo-assignment-frontend.onrender.com Test account: Username: test password: test
Before running, create a new DB with the SQL in schema.sql at /internal/db/schema.sql $ createdb cvwo_assignment $ psql -d cvwo_assignment -f internal/db/schema.sql
To seed values: psql -d cvwo_assignment -f internal/db/seeds.sql
Next, run the follow command at the root and configure the JWT_SECRET and the DATABASE_URL in the new .env file.
$ cp .env.example .env
To get a JWT secret: $ openssl rand -base64 32 Paste this in the env file.
To start the backend, run $ go run cmd/server/main.go
To view the backend visit: http://localhost:8000
Next, cd into the frontend folder and run to make your copy of the env file located at frontend/.env.example
$ cp .env.example .env
Install dependencies: $ npm install
Run the app: npm run dev
To check on the app, visit http://localhost:5173
You may create a new account or use the test user at: Username: alice Password: alice123
###AI Usage: As per the project requirement, I did not use AI to generate the code for the project and mainly used it to give feedback and discuss implementations, like figuring out if i should structure my project like -> Posts
- handlers.go
- dataaccess.go Or ->handler -posts.go -comments.go
It also helped as an extra buffed up google search in some cases. However I did ask it to generate the SQL command to seed an initial round of posts/comments/users and topics. I provided the format and asked it to generate the fake posts/comments and topics for me to get started with which I felt was more productive than doing it manually or using lorem ipsum texts.