- Description
- Objectives
- Technologies-Used
- Key-Features
- File system:
- Main-Directories
- Instructions
- Authors
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
The main objective of this project is to allow user registering with:
- GITHUB
- 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
- 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.
- 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.
- Only registered users can like or dislike posts and comments.
- The number of likes and dislikes is visible to all users.
- Users can filter posts by categories, created posts, and posts liked by them.
The application utilizes Docker for managing the development environment.
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
.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.
-
how to install:
$ git clone https://learn.zone01dakar.sn/git/mthiaw/forum-authentication.git $ cd forum-authentication -
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
-
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