A modern web forum built with React and Go, featuring user authentication, post management, and real-time commenting.
- React.js + TailwindCSS
- Go + GORM
- MySQL + PlanetScale
- Clone the repository
git clone <repository-url>
cd cvforum- Install frontend dependencies
cd clientv2
yarn install- Install backend dependencies
cd server
go get-
Set up MySQL database
-
Configure environment files
Frontend (clientv2/.env):
REACT_APP_BACKEND_URL=<YOUR_BACKEND_URL>
Backend (server/.env):
FRONTEND=<YOUR_FRONTEND_URL>
DSN=<DATABASE_CONNECTION_STRING>
PORT=<YOUR_DESIRED_BACKEND_PORT>
- Start the development servers
Frontend:
cd clientv2
yarn startBackend:
cd server
go run main.go- User Authentication: Secure registration and login system with JWT tokens
- Post Management: Create, read, update, and delete forum posts
- Comment System: Interactive commenting on posts
- Tag Filtering: Organize and filter posts by categories
- Responsive Design: Mobile-friendly interface with TailwindCSS
- Real-time Updates: Dynamic content loading and updates
The navigation bar adapts based on authentication status:
- Authenticated users: Home, My Posts, Create Post, and Logout options
- Unauthenticated users: Home and Login options
The main page displays all forum posts with filtering capabilities by category tags.
- Click the "Log In" button in the navigation bar
- Select "Register here" link
- Fill in username and password (minimum 6 characters)
- Click "Register" to create your account
- Click "Log In" in the navigation bar
- Enter your username and password
- Click "Log In" to access your account
Click "Log Out" in the navigation bar to end your session.
- All Posts: Access from the home page
- Your Posts: Click "My Posts" in the navigation bar
- Full Post: Click on any post card to view complete content and comments
- Click "Create new post" in the navigation bar
- Fill in the title and description
- Select a category tag
- Click "Post" to publish
- Navigate to your post's individual page
- Click "Edit Post" (only visible for post owners)
- Modify title, description, or category
- Click "Edit" to save changes
- Go to the Edit Post page
- Click "Delete" button
- Confirm deletion
Click on any post to view all its comments on the individual post page.
- Go to a post's individual page
- Use the comment box below the post
- Type your comment
- Click "Post" to submit
- Find your comment on the post page
- Click "Edit" (only visible for comment owners)
- Modify the comment text
- Click "Done" to save
- Click "Edit" on your comment
- Click "Delete" to remove the comment
Use the category dropdown on both the Home page and My Posts page to filter posts by specific tags. Select "All" to view posts from all categories, or choose a specific category to narrow down the results.
This project was built with knowledge gained from various online resources and educational content creators, including freeCodeCamp.org, Web Dev Simplified, and other programming tutorials that helped shape the development approach and implementation.