This project is a web-based forum that facilitates user communication through posts and comments, supports category-based filtering, and allows users to like or dislike posts and comments. The forum is built using Go, SQLite, and Docker while following best practices in web development, authentication, and database management.
- User Authentication: Registration, login, and session management using cookies.
- Post & Comment System: Users can create posts and comment on existing posts.
- Category Association: Posts can be categorized for better organization.
- Like & Dislike System: Registered users can like or dislike posts and comments.
- Filtering Mechanism:
- By category (acts as subforums)
- By user-created posts
- By user-liked posts
- Database Management:
- SQLite as the primary database
- Implementation of at least one
SELECT,CREATE, andINSERTquery - ER Diagram for structured database design
- Security Enhancements (Bonus Tasks):
- Password encryption using bcrypt
- Session management using UUID
- Error Handling:
- HTTP status handling
- Technical error management
- Dockerization:
- Containerized application for better dependency management and deployment
- Go (Standard Go packages)
- SQLite (sqlite3 package)
- Docker (for containerization)
- bcrypt (for password encryption)
- UUID (for unique session management)
- HTML (Frontend markup)
- HTTP (For client-server communication)
Ensure you have the following installed:
- Go
- Docker
- SQLite
- Clone the repository:
git clone https://learn.zone01kisumu.ke/git/forum cd forum - Build and run the application:
go build -o forum . ./forum - Alternatively, run the application directly:
go run . - Run the application using Docker:
docker build -t forum-app . docker run -p 8080:8080 forum-app
- Register/Login to access the forum.
- Create Posts & Comments (Only for registered users).
- Browse Posts (Public visibility for all users).
- Like/Dislike posts and comments (Only for registered users).
- Filter Posts by categories, created posts, or liked posts.
This project helps in understanding:
- Web development basics (HTML, HTTP, Sessions, and Cookies)
- Authentication and security best practices
- Database management and SQL queries
- Containerization with Docker
- Structuring a Go-based web application
- Implementing filtering and category management
- Best practices in error handling and testing
- Secure authentication mechanisms
- Proper error handling
- Database structuring with ER diagrams
- Unit testing for core functionalities
- @dochiel
- @ramuiruri
- @wonyango
- @najwang
- @shfana
Found a bug? Have a feature request? Submit an issue or contribute to the project by creating a pull request.
This project is open-source and licensed under MIT License.