Skip to content
/ forum Public

A web forum developed in Go that enables users to register, log in, publish messages, comment, and interact with content through likes and dislikes

Notifications You must be signed in to change notification settings

Pba23/forum

Repository files navigation

#Forum

A comprehensive web forum allowing users to communicate, share, and interact through posts and comments.

Description

This project is a web forum developed in Go that enables users to register, log in, publish messages, comment, and interact with content through likes and dislikes. The forum uses SQLite as a database and is containerized with Docker for easy deployment.

Features

Core Features

  • Authentication

    • User registration (email, username, password)
    • Login/logout functionality
    • User session management with cookies
  • Communication

    • Post creation (restricted to logged-in users)
    • Adding comments to posts (restricted to logged-in users)
    • Viewing posts and comments (open to all)
  • Categorization

    • Association of one or more categories to each post
    • Filtering posts by category
  • Interactions

    • Like and dislike system for posts and comments
    • Like/dislike counter visible to all users
  • Filtering

    • Filter by categories
    • Filter by created posts (logged-in users only)
    • Filter by liked posts (logged-in users only)

Supplementary Modules

This project is complemented by additional modules in separate repositories:

Technologies Used

  • Backend: Go
  • Database: SQLite
  • Containerization: Docker
  • Frontend: HTML, CSS, Vanilla JavaScript (no frameworks)
  • Security: bcrypt for password encryption, UUID for sessions

Installation and Setup

Prerequisites

  • Go installed on your machine
  • Docker installed on your machine

Installation

  1. Clone the repository
git clone https://github.com/your-username/forum.git
cd forum
  1. Build the Docker image
docker build -t forum .
  1. Launch the container
docker run -p 8080:8080 forum
  1. Access the forum in your browser at: http://localhost:8080

Database Structure

The SQLite database includes the following tables:

  • Users
  • Posts
  • Comments
  • Categories
  • Post_Categories (relationship between posts and categories)
  • Likes (likes on posts and comments)

Testing

To run the unit tests:

go test ./...

Contribution

This project was done with :

About

A web forum developed in Go that enables users to register, log in, publish messages, comment, and interact with content through likes and dislikes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published