Skip to content

aniasse/forum-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

186 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Web Forum (authentication)

Table of Contents

  1. Description
  2. Objectives
  3. Technologies-Used
  4. Key-Features
  5. File system:
  6. Main-Directories
  7. Instructions
  8. Authors

Description:


This project is a continuation of the web forum application developed using Go and SQLite for data storage. The forum allows users to communicate with each other, associate categories with posts, like and dislike posts adding image and comments, and filter posts based on different categories. User is also able register with his GπŸ”΄πŸŸ‘GLE or GITHUB πŸ±β€πŸ‘€ account

Objectives

The main objective of this project is to allow user registering with:

  • GOOGLE
  • GITHUB

Technologies Used


  • GO, also called Golang or Go language, is an open source programming language that Google developed. For more details check their website
  • HTML,The HyperText Markup Language is the standard markup language for documents designed to be displayed in at web browser.
  • CSS,Cascading Style Sheets, form a computer language that describes the presentation of HTML documents.

  • SQlite, it is a database engine written in the C programming language. It is not a standalone app; rather, it is a library that software developers embed in their apps. As such, it belongs to the family of embedded databases.

  • Docker, Docker is a platform designed to help developers build, share, and run container applications. See more here

Key-Features

πŸ” Authentication

  • registration by providing their email address, username, and password.
  • Registration using GπŸ”΄πŸŸ‘GLE or GITHUB account
  • Creation of login sessions, allowing users to sign in to the forum.
  • Use of cookies to manage sessions with an expiration date.

πŸ’» Communication

  • Registered users can create posts adding image to a post and comments.
  • Categories can be associated with posts.
  • All posts and comments are visible to all users.

πŸ‘πŸ»πŸ‘ŽπŸ» Likes and Dislikes

  • Only registered users can like or dislike posts and comments.
  • The number of likes and dislikes is visible to all users.

β™» Filtering

  • Users can filter posts by categories, created posts, and posts liked by them.

πŸ‹ Docker

The application utilizes Docker for managing the development environment.

file-system

The project is organized into multiple directories for better source code organization.

.
|
|____πŸ“‚Authentication  
|    |-----------πŸ“„auth_api_tools.go
|    |-----------πŸ“„BD.go
|    |-----------πŸ“„helpers.go
|    |-----------πŸ“„Session_com.go
|
|____πŸ“‚Communication
|    |-----------πŸ“„categories.go
|    |-----------πŸ“„comment.go
|    |-----------πŸ“„posts.go
|    |-----------πŸ“„reaction.go
|    |-----------πŸ“„welcome.go
|
|____πŸ“‚Database
|    |-----------πŸ“„commands.go
|    |-----------πŸ“„const_db.go
|    |-----------πŸ“„Init_db.go
|    |-----------πŸ“„tables.go
|
|____πŸ“‚Handlers
|    |-----------πŸ“„handle.go
|
|____πŸ“‚Models
|    |-----------πŸ“„ERD.go
|
|____πŸ“‚Routes
|    |-----------πŸ“„authentication.go
|    |-----------πŸ“„communication.go
|    |-----------πŸ“„fetcher.go
|    |-----------πŸ“„filter.go
|    |-----------πŸ“„github.go
|    |-----------πŸ“„google.go
|    |-----------πŸ“„index.go
|    |-----------πŸ“„processing.go
|    |-----------πŸ“„profil-cmt.go
|    |-----------πŸ“„profil-fav.go
|    |-----------πŸ“„profil.go
|    |-----------πŸ“„react.go
|    |-----------πŸ“„tools_communication.go
|    |-----------πŸ“„upload.go
|
|____πŸ—„πŸ“‚templates
|    |____πŸ“‚front-tools
|    |    |___πŸ“‚css
|    |    |   |-----------🎨aboutus.css
|    |    |   |-----------🎨error.css
|    |    |   |-----------🎨logand.css
|    |    |   |-----------🎨style.css
|    |    |
|    |    |___πŸ“‚images
|    |    |   |-----------πŸ“·(front-images...)
|    |    |
|    |    |___πŸ“‚Js
|    |    |   |-----------πŸ“’script.js
|    |    |   |-----------πŸ“’upload.js
|    |    |
|    |___πŸ“‚image_storage
|    |   |-----(πŸ’Ύimages uploaded from website...)
|    |    
|    |--------------------------------------------------πŸ“createaccout.html
|    |--------------------------------------------------πŸ“error.html
|    |--------------------------------------------------πŸ“filter_com.html
|    |--------------------------------------------------πŸ“filter_fav.html
|    |--------------------------------------------------πŸ“footer.html
|    |--------------------------------------------------πŸ“head.html
|    |--------------------------------------------------πŸ“home.html
|    |--------------------------------------------------πŸ“home.html
|    |--------------------------------------------------πŸ“index.html
|    |--------------------------------------------------πŸ“main.html
|    |--------------------------------------------------πŸ“navbar.html
|    |--------------------------------------------------πŸ“profil.html
|    |--------------------------------------------------πŸ“register.html
|
|____πŸ“‚tools
|    |--------------πŸ”§Id_toold.go
|    |--------------πŸ”§standard_funcs.go
|    |--------------πŸ”§validity.go
|
|----πŸ‹Dockerfile
|
|----πŸ›’forum.db
|
|----βš™go.mod
|
|----πŸ”ƒgo.sum
|
|----πŸ“main.go
|
|----πŸ“œREADME.md
|
|----βš™script.sh
|
|----πŸ“œtask guider.md
.

Main-Directories

Authentification directory contains files related to user authentication, including database management and helper functions.

Communication directory is dedicated to communication, including the creation of comments and posts.

Database directory includes files related to database management, such as SQL commands, constants, database initialization, and table definitions.

handlers directory may contain request handler functions or other features related to processing user requests.

models directory may contain data models or other elements related to the application's domain model.

Routes directory may contain route management files to direct user requests to the appropriate functionalities.

templates directory may contain HTML templates used to generate web pages.

tools directory may contain tools, utilities, or reusable libraries.

Some directories, such as css, images, and JS, are organized into subdirectories for better structuring of frontend resources.
Feel free to explore each individual subdirectory for more details on its contents and specific purpose.

Instructions

  1. how to install:

    $ git clone https://learn.zone01dakar.sn/git/mthiaw/forum-authentication.git
    $ cd forum-authentication
  2. how to enter the forum:

    go run main.go
    βœ… database has been created successfully
    βœ… 'users' table has been created in database succesfully
    βœ… 'posts' table has been created in database succesfully
    βœ… 'comments' table has been created in database succesfully
    βœ… 'post_reactions' table has been created in database succesfully   
    βœ… 'comment_reactions' table has been created in database succesfully
    βœ… 'categories' table has been created in database succesfully       
    βœ… 'sessions' table has been created in database succesfully
    πŸ“‘----------------------------------------------------πŸ“‘
    |                                                      |
    | 🌐 Server has started at "http://localhost:8080 🟒" |
    |                                                      |
    πŸ“‘----------------------------------------------------πŸ“‘

    go to the link and follow instructions

  3. how to Use Docker to build an image of the application.

    docker build -t forum-app .
    # step 1 : build image
    docker build -t <image_name>
    # step 2 : build and run container with built image
    docker run -d --name <container_name> -p <port>: <container_port> <image_name>
    # enter the container and list items with this command a
    docker exec <container_name> ls -l 

or execute directly the script.sh file

$sh script.sh

Authors:

front-end team :

back-end team :

@Licensed by AVAMSπŸ‘ team

About

Migration of forum-authentication from Zone01 Dakar Gitea

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors