A full-stack web forum application built with Go (backend) and React (frontend).
Live site: https://cvwo-web-forum-jc0a.onrender.com
The Render URL retains the original deployment slug, but the application is named Simple Web Forum.
- Features
- Setup Instructions
- Running the Application
- Project Structure
- AI Usage Documentation
- User registration and login
- topic, post, comment CRUD (Create, Read, Update, Delete)
- Go (v1.18 or above)
- Node.js (v16 or above) and npm/yarn
git clone https://github.com/lucas-wyd/simple-web-forum.gitCreate a file named .env in the client directory with:
REACT_APP_API_URL=http://localhost:8000
Set the environment variable before running the backend:
REACT_APP_API_URL=http://localhost:8000
FRONTEND_ORIGIN_URL=http://localhost:3000
PORT=8000 # Backend
- Install dependencies:
go mod tidy
- Start the backend server (default port: 8000):
Or, for live reload (if you have air installed):
go run cmd/server/main.go
air
- Go to the client directory:
cd client - Install dependencies:
yarn install # or npm install - Start the frontend development server (default port: 3000):
yarn start # or npm start
- Open your browser and go to http://localhost:3000
- Ensure the backend is running before using the frontend.
- If you encounter CORS issues, make sure CORS is enabled in the Go backend.
- Default backend API URL is
http://localhost:8000.
simple-web-forum/
├── client/ # React frontend
├── internal/ # Go backend (API, models, handlers, etc.)
├── cmd/server/ # Go server entry point
├── go.mod # Go module file
└── README.md # This file
This project utilized AI tools (such as GitHub Copilot and Gemini) in the following ways:
- API and Library Usage:
- Guidance and code examples for using some APIs and libraries e.g. Fetch API in the frontend (React) for HTTP requests.
- Reference and troubleshooting for using the
sqlite3library in the Go backend for database operations.
- Frontend CSS Styles Adjustments:
- Suggestions for improving and customizing CSS styles, including responsive design and UI polish.
- Bug Investigation:
- Assistance in diagnosing and resolving tricky bugs, such as CORS issues.
- README Generation:
- Drafting and polishing this README document to ensure clarity and completeness.
All AI-generated suggestions were reviewed, tested, and integrated by the developer. No AI-generated content is used without human oversight.