Skip to content

zakariasalhi12/Forum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

266 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forum

Description

This is a web-based forum application built with Go. It provides a platform for users to create posts, comment on them, like content, and interact in real-time through WebSocket connections. The application includes user authentication, session management, and a responsive frontend.

Forum Image

Features

  • User registration and login
  • Create, view, and manage posts
  • Comment on posts
  • Like posts and comments
  • Real-time messaging via WebSocket
  • Rate limiting and security middleware
  • SQLite database for data persistence
  • Static file serving for frontend assets

Installation

Prerequisites

  • Go 1.22 or later
  • SQLite3

Steps

  1. Clone the repository:

    git clone <repository-url>
    cd forum
    
  2. Install dependencies:

    go mod download
    
  3. Set up the database:

    • The application will automatically create the database schema on first run.
  4. Build the application:

    go build -o server .
    
  5. Run the server:

    ./server
    

The server will start on the configured port (default: 8080).

Using Docker

  1. Build the Docker image:

    docker build -t forum .
    
  2. Run the container:

    docker run -p 8080:8080 forum
    

Usage

  • Access the application at http://localhost:8080
  • Register a new account or log in
  • Create posts, add comments, and interact with other users
  • Use the real-time chat feature for instant messaging

Technologies

  • Backend: Go
  • Database: SQLite
  • Frontend: HTML, CSS, JavaScript
  • Real-time Communication: WebSocket (Gorilla WebSocket)
  • Authentication: Session-based
  • Containerization: Docker

Project Structure

  • Server.go: Main server entry point
  • BackEnd/: Backend logic including API handlers, middleware, models, and routers
  • FrontEnd/: Frontend assets including static files, JavaScript, and templates
  • assets/: Additional assets like images
  • Logs/: Application logs

About

A web-based forum application built with Go, featuring user authentication, posts, comments, likes, and real-time WebSocket messaging.

Topics

Resources

Stars

Watchers

Forks

Contributors