Skip to content

AlexandreRiv/LeForum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

255 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LeForum

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.

Go Version

πŸ“‹ Contents

🎯 Description

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.

✨ Features

πŸ” Authentication System

  • βœ… Traditional sign-up and login (email/password)
  • βœ… OAuth integration with GitHub and Google
  • βœ… Session management
  • βœ… User profile management

πŸ“ Content Management

  • βœ… Create and view posts
  • βœ… Post categorization
  • βœ… Like/dislike system
  • βœ… Comments and replies
  • βœ… Post filtering by category or recency

🎨 User Interface

  • βœ… Responsive design
  • βœ… Light/dark mode toggle with preference persistence
  • βœ… User-friendly navigation

πŸ› οΈ Technologies

Backend

go-badge mysql-badge

  • Go (Golang) - Main programming language
  • HTTP Server - Go standard library
  • MySQL - Database
  • Session Management - Custom session handling

Frontend

<<<<<<< HEAD tailwind-badge javascript-badge

tailwind-badge javascript-badge html-badge

dev

  • HTML Templates - Server-side rendering
  • Tailwind CSS - CSS framework
  • JavaScript - Client-side interactivity

Authentification

oauth-badge

  • Custom authentication system
  • OAuth 2.0 (Google, GitHub)
  • Secure password hashing with bcrypt

πŸ“ project Structure

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

βš™οΈ Configuration

Variables d'environnement requises

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

πŸ—„οΈ Database

The application requires a MySQL database with the following main tables:

Main Tables

  • users - User information
  • sessions - Active user sessions
  • posts - Forum posts
  • comments - Post comments
  • categories - Post categories
  • affectation - Relations between posts and categories
  • liked_posts - Tracking likes and dislikes

Basic Schema

-- 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] 
);

πŸš€ Connection

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.

πŸ’» Usage

Quick Start

  1. Create an account - Sign up with email/password or via OAuth
  2. Browse categories -Explore various discussion topics
  3. Create a post -Share your thoughts and start a conversation
  4. Engage -Like, dislike, and comment on posts
  5. Customize -Switch between light and dark modes as you prefer

OAuth Features

To use OAuth authentication:

  1. GitHub : Set up an OAuth App in your GitHub settings
  2. Google : Create a project in Google Cloud Console and enable the OAuth API

<<<<<<< HEAD

πŸ“ Contributors

=======

dev

πŸ“ Contributors

  • Loic - GitHub
  • Nathan - GitHub
  • Matteo - GitHub
  • Alexandre - GitHub

<<<<<<< HEAD

dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors