GoForum is a web application that allows users to engage in discussions, create and categorize posts, like or dislike content, and apply various filters.
GoForum offers the following key features:
-
User Registration:
- Users can register by providing their email, username, and password.
- Duplicate email registrations are handled gracefully.
-
Communication:
- Registered users can create posts and comments.
- Posts can be associated with one or more categories.
- Posts and comments are visible to all users, even non-registered ones.
-
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:
- A filtering mechanism allows users to:
- Filter posts by categories.
- Filter posts created by them.
- Filter posts they've liked.
- A filtering mechanism allows users to:
-
Database:
- GoForum uses SQLite as the database, ensuring efficient data storage and retrieval.
-
Docker:
- The application is containerized using Docker for easy deployment and management.
- Use Docker to containerize the application.
Before you begin, ensure you have the following prerequisites:
- Go: Install the Go programming language from https://golang.org/dl/
- Docker: Install Docker: https://docs.docker.com/get-docker/
-
Clone the GoForum repository:
git clone https://01.kood.tech/git/Karl-Thomas/forum.git cd forum
-
Build and run the GoForum web application:
go run .
GoForum should now be running locally at http://localhost:8080.
-
Access the GoForum application at http://localhost:8080.
-
Register as a new user by providing your email, username, and password.
-
If the email is already registered, you will receive an error message.
-
Registered users can create posts and comments.
-
Posts can be categorized and will be visible to all users, registered or not.
-
Registered users can like or dislike posts and comments.
-
The number of likes and dislikes is visible to all users.
- Use the filtering mechanism to:
- Filter posts by categories.
- Filter posts created by you.
- Filter posts you've liked.
GoForum can be containerized using Docker. Refer to the Docker documentation for more information on containerizing and deploying the application.
- Open the project folder and run this command:
docker build -t forum .
- Then run this command to start server on port 8080:
docker run -p 8080:8080 forum
- Open browser and write localhost:8080 to see if webpage and docker works.
docker run -p 8080:8080 forum
- Kveber
- Karl-Thomas
- Ktuule