TomatoesBurner / Agile-Web-Community-Forum

0 stars 0 forks source link

Touch - Local Community Forum

Introduction

Touch is a vibrant and supportive community platform designed to foster mutual assistance among its members. Our community encompasses a diverse range of topics, including:

Touch is more than just a forum—it's a community where members help each other thrive. Join us today and be a part of a supportive network that values sharing, learning, and growing together.

Team Member

Name Student ID Github user name
Xiang Li 23921151 TomatoesBurner
Wannian Mei 23855006 WannianMEI
Hangqiuzi Wang 23904899 akikodesu
Chang Chen 23931637 TheCatFactoryOfV

Virtual Environment Setup

A Virtual Environment is necessary to develop and test the application. This is performed in a safe, self-contained manner through Python's Virtual Environment.

1. Initialise a Python Virtual Environment

Ensure that your current working directory contains the requirements.txt file, in this case it is '/venv', then use:

$ python -m venv venv

NOTE: Your system may have python3 aliased as something other than python

2. Activate the new Virtual Environment

On standard Unix operating systems this would be:

$ source venv/bin/activate

On Windows systems:

$ venv\Scripts\activate

3. Install Requirements

The requirements.txt file contains all the Python dependencies that the application requires to run. These can be downloaded and installed with:

$ pip install -r requirements.txt

NOTE: Your system may have pip3 aliased as something other than pip.

4. Start the server

To start the server and open pages in our browser, the follow command should be executed:

flask run

The application should now be running at http://localhost:5050. If you want to modify the port number, you can modify it in .flaskenv and pip install python-dotenv.

Module Design

1. Auth Module

Function Overview

The Auth Module handles user registration, login, logout,It also includes security questions for password recovery.

Main Features

Main Files

2. Post and Comment Module

Function Overview

The PostCom Module allows users to create post, view and search. Users can comment on posts and mark the best answer.

Main Features

Main Files

3. Profile Module

Function Overview

The Profile Module allows users to manage their profile settings, including changing their avatar and username, viewing their own posts and comments, and deleting their posts and comments.

Main Features

Main Files

4. Notification Module

Function Overview

The Notification Module is responsible for sending notifications to users when their posts or comments receive replies.

Main Features

Main Files

Running Tests

We use unittest to run the unit test.

Test User Accounts

Email: user123@qq.com

Password: 123456

Unit Test

Install Unittest

unittest is a unit testing framework in Python that is built into the standard library. You can install it by following command:

pip install unittest

Running Unittest

Use the following command to run your unittests:

python -m unittest tests.unittest

NOTE: Your system may have python3 aliased as something other than python.

Responsive Design

768*800

responsive_768*800_1.jpg

1024*800

responsive_1024*800_1.jpg