LeForum is a web forum application built with Go, designed to provide a modern and efficient platform for discussions. This project implements a complete forum system with user authentication, post management, categories, and an interactive UI with both light and dark modes.
LeForum is a modern web forum application built with Go, offering an efficient platform for online discussions. The project includes a complete forum system with user authentication, post management, categorization, and an interactive user interface with light and dark mode support.
- β Traditional sign-up and login (email/password)
- β OAuth integration with GitHub and Google
- β Session management
- β User profile management
- β Create and view posts
- β Post categorization
- β Like/dislike system
- β Comments and replies
- β Post filtering by category or recency
- β Responsive design
- β Light/dark mode toggle with preference persistence
- β User-friendly navigation
- Go (Golang) - Main programming language
- HTTP Server - Go standard library
- MySQL - Database
- Session Management - Custom session handling
dev
- HTML Templates - Server-side rendering
- Tailwind CSS - CSS framework
- JavaScript - Client-side interactivity
- Custom authentication system
- OAuth 2.0 (Google, GitHub)
- Secure password hashing with bcrypt
LeForum/
βββ cmd/
β βββ server/ # Point d'entrΓ©e de l'application
βββ internal/
β βββ api/ # Gestionnaires HTTP et routage
β β βββ handlers/ # Gestionnaires de requΓͺtes
β β βββ middleware/ # Middleware HTTP
β βββ auth/ # Composants d'authentification
β β βββ oauth/ # Fournisseurs OAuth
β β βββ session/ # Gestion des sessions
β βββ config/ # Configuration de l'application
β βββ domain/ # ModΓ¨les de domaine
β βββ service/ # Logique mΓ©tier
β βββ storage/ # AccΓ¨s aux donnΓ©es
β βββ repositories/ # ImplΓ©mentations des repositories
βββ web/
βββ static/ # Ressources statiques (CSS, JS)
βββ templates/ # Templates HTML
| Variable | Description | Example |
|---|---|---|
DB_USER |
Database username | root |
DB_PASSWD_USER |
Database password | password123 |
DB_HOST |
Database host | localhost |
DB_PORT |
Database port | 3306 |
DB_NAME |
Database name | leforum |
GITHUB_CLIENT_ID |
GitHub OAuth client ID | your_github_id |
GITHUB_CLIENT_SECRET |
GitHub OAuth client secret | your_github_secret |
GOOGLE_CLIENT_ID |
Google OAuth client ID | your_google_id |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | your_google_secret |
The application requires a MySQL database with the following main tables:
users- User informationsessions- Active user sessionsposts- Forum postscomments- Post commentscategories- Post categoriesaffectation- Relations between posts and categoriesliked_posts- Tracking likes and dislikes
-- Exemple de structure (simplifiΓ©)
TABLE USER (
id int [primary key, not null, increment],
username varchar(20) [not null],
mail varchar(255) [not null],
password varchar(255) [not null],
newsletters bool [not null, default: false]
);
CREATE TABLE postsTABLE POST {
id int [primary key, not null, increment],
name varchar(50) [not null] ,
description text [not null],
image image ,
like int [default: 0],
dislike int [default: 0],
id_user int [not null]
);To connect to the site, enter the following address in your browser:
forum.ynov.zeteox.fr
To connect to the VPS, use the following credentials:
ssh -p 50022 guest@server-app.zeteox.fr
Useguest as the password.
- Create an account - Sign up with email/password or via OAuth
- Browse categories -Explore various discussion topics
- Create a post -Share your thoughts and start a conversation
- Engage -Like, dislike, and comment on posts
- Customize -Switch between light and dark modes as you prefer
To use OAuth authentication:
- GitHub : Set up an OAuth App in your GitHub settings
- Google : Create a project in Google Cloud Console and enable the OAuth API
<<<<<<< HEAD
=======
dev
dev