A comprehensive web forum application built using Go that enables user communication through posts, comments, and reactions.
- Abdelhamid Bouziani
- Hamza Maach
- Omar Ait Benhammou
- Mehdi Moulabbi
- Youssef Basta
- Username-based registration and login
- Secure session management using cookies
- Create and read posts
- Comment on posts
- Multiple category associations for posts
- Like/dislike functionality for posts and comments
- Comprehensive user engagement tools
- Filter posts by categories
- Filter posts by creation date
forum/
├── cmd/
│ └── main.go # Application entry point
├── server/
│ ├── config/ # Configuration management
│ ├── database/ # Database interaction logic
│ ├── controllers/ # Request handling and business logic
│ ├── models/ # Data structures and models
│ ├── validators/ # Request validation
│ ├── routes/ # Application routing
│ └── utils/ # Shared utility functions
├── web/
│ ├── assets/ # Static resources (CSS, JS, images)
│ └── templates/ # HTML templates
├── dockerfile # Docker containerization
├── commands.sh # Docker build and deployment script
├── go.mod # Go module dependencies
├── go.sum # Dependency checksum
└── README.md # Project documentation
View the detailed database schema here.
- Users: User authentication and profile information
- Posts: Forum post content
- Comments: Post responses and discussions
- Categories: Post classification
- Categories_Posts: Post-category relationships
- Posts_Reactions: Post interaction tracking
- Comments_Reactions: Comment interaction tracking
- Sessions: User authentication state management
- Go 1.22+
- SQLite3 database
- bcrypt for password hashing
- HTML5 & CSS3
- JavaScript
- Font Awesome icons
- Docker containerization
- Go 1.22 or higher
- SQLite3
- Docker (optional)
-
Clone the Repository
git clone https://github.com/hmaach/forum.git cd forum -
Install Dependencies
go mod download
-
Database Management
-
Create database schema:
go run . --migrate -
Create schema with demo data:
go run . --seed -
Drop database schema:
go run . --drop
-
-
Run the Application
cd cmd go run .
Access the forum at
http://localhost:8080
-
Make script executable:
chmod +x commands.sh
-
Run deployment script:
./commands.sh
-
Access the forum at
http://localhost:8080
Please read our contributing guidelines before submitting pull requests or issues.