SpreadSheets commited on
Commit
49148fc
·
1 Parent(s): 67d7fd1

feat: add initial README with project overview, features, and setup instructions

Browse files
Files changed (1) hide show
  1. README.md +135 -0
README.md CHANGED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PoraHobeBot
2
+
3
+ ## Project Overview
4
+
5
+ PoraHobeBot is a web-based platform designed to facilitate the sharing and management of academic notes and resources. It provides a centralized repository for students to upload, browse, and categorize study materials, streamlining the exchange of knowledge. The application features a modern, responsive user interface and robust administrative tools for content moderation.
6
+
7
+ ## Features
8
+
9
+ ### User Features
10
+
11
+ - **Authentication**: Secure login and registration system supporting OAuth integration with Google and Discord.
12
+ - **Note Management**: Users can upload notes in various formats (files or external links).
13
+ - **Resource Organization**: Notes are categorized by subject and type (e.g., Lecture, Assignment, Reference) for easy retrieval.
14
+ - **Search and Filter**: Advanced filtering capabilities allow users to find specific resources quickly.
15
+ - **Profile Management**: Users can view their upload history and manage connected accounts.
16
+
17
+ ### Administrative Features
18
+
19
+ - **Dashboard**: A comprehensive overview of platform statistics, including total users, notes, and subjects.
20
+ - **Content Moderation**: Tools to review and delete inappropriate or irrelevant notes.
21
+ - **Taxonomy Management**: Administrators can create, edit, and remove subjects and note classifications.
22
+ - **User Management**: Capabilities to manage user roles and permissions.
23
+
24
+ ## Technical Architecture
25
+
26
+ The application is built using a monolithic architecture with server-side rendering.
27
+
28
+ - **Backend**: Python (Flask Framework)
29
+ - **Database**: SQLAlchemy ORM (SQLite for development, configurable for other RDBMS)
30
+ - **Frontend**: Jinja2 Templates, Tailwind CSS
31
+ - **Storage**: S3-compatible object storage for file persistence
32
+ - **Authentication**: Flask-Login, Flask-Dance (OAuth)
33
+
34
+ ## Installation and Setup
35
+
36
+ ### Prerequisites
37
+
38
+ - Python 3.13 or higher
39
+ - An S3-compatible storage service (e.g., AWS S3, MinIO, Cloudflare R2)
40
+ - Google and/or Discord Developer Application credentials (for OAuth support)
41
+
42
+ ### Step 1: Clone the Repository
43
+
44
+ ```bash
45
+ git clone https://github.com/spreadsheets600/porahobebot.git
46
+ cd porahobebot
47
+ ```
48
+
49
+ ### Step 2: Install Dependencies
50
+
51
+ It is recommended to use a virtual environment.
52
+
53
+ Using `uv` (recommended):
54
+
55
+ ```bash
56
+ uv sync
57
+ ```
58
+
59
+ Or using `pip`:
60
+
61
+ ```bash
62
+ pip install -r requirements.txt
63
+ ```
64
+
65
+ *Note: If `requirements.txt` is missing, generate it from `pyproject.toml` or install dependencies manually as listed in the configuration.*
66
+
67
+ ### Step 3: Configuration
68
+
69
+ Create a `.env` file in the project root directory. You can copy the structure from the provided configuration parameters.
70
+
71
+ ```env
72
+ # Core Security
73
+ SECRET_KEY=your_secure_random_key
74
+
75
+ # Database
76
+ DATABASE_URL=sqlite:///app.db
77
+
78
+ # Authentication (Optional if not using OAuth)
79
+ GOOGLE_CLIENT_ID=your_google_client_id
80
+ GOOGLE_CLIENT_SECRET=your_google_client_secret
81
+ DISCORD_CLIENT_ID=your_discord_client_id
82
+ DISCORD_CLIENT_SECRET=your_discord_client_secret
83
+ DISCORD_BOT_TOKEN=your_discord_bot_token
84
+
85
+ # Storage (S3 Compatible)
86
+ S3_BUCKET_NAME=your_bucket_name
87
+ S3_ENDPOINT=your_s3_endpoint_url
88
+ S3_ACCESS_KEY_ID=your_access_key
89
+ S3_SECRET_KEY=your_secret_key
90
+
91
+ # Administration
92
+ ADMIN_SECRET_CODE=your_admin_secret_code
93
+ ```
94
+
95
+ ### Step 4: Initialize the Database
96
+
97
+ Initialize the database schema and apply migrations.
98
+
99
+ ```bash
100
+ flask db upgrade
101
+ ```
102
+
103
+ ### Step 5: Seed Initial Data (Optional)
104
+
105
+ Populate the database with initial subjects or required data if a seed script is available.
106
+
107
+ ```bash
108
+ python seed_subjects.py
109
+ ```
110
+
111
+ ### Step 6: Run the Application
112
+
113
+ Start the development server.
114
+
115
+ ```bash
116
+ python run.py
117
+ ```
118
+
119
+ The application will be accessible at `http://localhost:5000` (or the configured port).
120
+
121
+ ## Deployment
122
+
123
+ For production environments, it is recommended to use a production-grade WSGI server such as Gunicorn or uWSGI behind a reverse proxy like Nginx.
124
+
125
+ ```bash
126
+ gunicorn -w 4 -b 0.0.0.0:8000 "app:create_app()"
127
+ ```
128
+
129
+ ## License
130
+
131
+ [Insert License Information Here]
132
+
133
+ ## Contributing
134
+
135
+ Contributions are welcome. Please submit a pull request or open an issue for any enhancements or bug reports.