This is a Flask-based web application that provides user registration, login, file upload/download, profile management, and a simple forum system. The application uses JSON files to store user data and forum posts, and it allows users to upload and manage files in their personal directories.
Features
User Management:
User registration and login with password hashing.
User profile management, including editing profile information and uploading avatars.
Admin panel for managing users.
File Management:
Users can upload files to their personal directories.
Users can download and delete their uploaded files.
Forum System:
Users can create, view, and comment on forum posts.
Posts can include images.
Installation
Clone the Repository:
git clone https://github.com/yourusername/yourrepository.git
cd yourrepository
Set Up a Virtual Environment (Optional but Recommended):
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install Dependencies:
pip install -r requirements.txt
Run the Application:
python app.py
The application will be available at http://127.0.0.1:5000/.
Usage
User Registration and Login
Register: Navigate to /register to create a new account.
Login: Navigate to /login to log in with your credentials.
File Management
Upload Files: Logged-in users can upload files from the /upload page.
Download Files: Files can be downloaded from the /download/<filename> route.
Delete Files: Files can be deleted using the /delete/<filename> route.
Profile Management
View Profile: Logged-in users can view their profile at /profile.
Edit Profile: Users can edit their profile information and upload an avatar at /edit_profile.
Forum System
Create Post: Logged-in users can create new forum posts at /create_post.
View Posts: All posts can be viewed at /posts.
View Post Details: Individual posts can be viewed at /post/<post_id>.
Add Comments: Logged-in users can add comments to posts at /post/<post_id>/comment.
Admin Panel
Admin Access: The admin panel is accessible at /admin and can only be accessed by the user admin.
Delete Users: The admin can delete users from the admin panel.
Flask Web Application README
Overview
This is a Flask-based web application that provides user registration, login, file upload/download, profile management, and a simple forum system. The application uses JSON files to store user data and forum posts, and it allows users to upload and manage files in their personal directories.
Features
User Management:
File Management:
Forum System:
Installation
Clone the Repository:
Set Up a Virtual Environment (Optional but Recommended):
Install Dependencies:
Run the Application:
The application will be available at
http://127.0.0.1:5000/
.Usage
User Registration and Login
/register
to create a new account./login
to log in with your credentials.File Management
/upload
page./download/<filename>
route./delete/<filename>
route.Profile Management
/profile
./edit_profile
.Forum System
/create_post
./posts
./post/<post_id>
./post/<post_id>/comment
.Admin Panel
/admin
and can only be accessed by the useradmin
.Directory Structure
Note: This README is a general guide. You may need to modify it according to your specific project structure and requirements.