A web forum built with Go that allows users to communicate through posts and comments, org anize content by categories, and interact via likes and dislikes.
- User registration and login with encrypted passwords
- Session management with cookies and expiration
- Create posts and associate them with one or more categories
- Comment on posts
- Like and dislike posts and comments
- Filter posts by category, your own posts, or posts you have liked
- All posts and comments visible to non-registered users
- Go 1.21+
- Docker
- Docker Compose
Clone the repository:
git clone https://github.com/your-repo/forum.git
cd forumRun the server:
go run cmd/main.goOpen your browser at:
http://localhost:8080
Build and start the container:
docker-compose up --buildStop the container:
docker-compose downThe database file is persisted in internals/db/data/forum.db on your local machine via a
Docker volume — your data survives container restarts.
forum/
├── cmd/
│ └── main.go # Entry point
├── internals/
│ ├── db/
│ │ ├── db.go # Database initialization
│ │ ├── schema.sql # Table definitions
│ │ └── data/ # SQLite database file
│ ├── handlers/ # HTTP request handlers
│ ├── middleware/ # Authentication middleware
│ ├── models/ # Data structs
│ ├── services/ # Business logic
│ ├── repository/ # Database queries
│ └── utils/ # Helper functions
├── web/
│ ├── pages/ # HTML templates
│ └── static/ # CSS, JS, icons
├── Dockerfile
├── docker-compose.yml
└── go.mod
- Sospeter Kinyanjui
- Juma Evans
- Silas Lelei
- Martin Odongo