|
1 |
| -```markdown |
2 | 1 | # PythaSpace
|
3 | 2 |
|
4 |
| -PythaSpace is a cutting-edge platform for publishing, sharing, and discovering high-quality articles and stories across various domains. It aims to cultivate a vibrant community of writers and readers, promoting intellectual discourse and knowledge exchange. |
| 3 | +PythaSpace is a cutting-edge platform designed for publishing, sharing, and discovering high-quality articles and stories across various domains. It aims to foster a vibrant community of writers and readers, promoting intellectual discourse and knowledge exchange. |
5 | 4 |
|
6 | 5 | ## Overview
|
7 | 6 |
|
8 |
| -PythaSpace is built with a modern web stack, focusing on a seamless user experience and robust backend services. The architecture includes: |
9 |
| -- **Backend**: Node.js with Express framework |
10 |
| -- **Database**: MongoDB with Mongoose ORM for data management |
11 |
| -- **Frontend**: EJS for templating, Bootstrap for styling, and Vanilla JS for functionality |
12 |
| -- **AI Integration**: OpenAI for content moderation and writing assistance |
| 7 | +PythaSpace is built with a robust architecture that leverages modern web technologies to deliver an intuitive and seamless user experience. The platform is structured as follows: |
13 | 8 |
|
14 |
| -The project structure is organized as follows: |
15 |
| -- **models/**: Mongoose schemas for User and Article |
16 |
| -- **routes/**: Express routes for authentication, articles, and API endpoints |
17 |
| -- **services/**: Services for AI moderation and LLM requests |
18 |
| -- **utils/**: Utility functions for file uploads |
19 |
| -- **views/**: EJS templates for rendering pages |
20 |
| -- **public/**: Static files including CSS and JavaScript |
| 9 | +- **Backend:** Node.js with the Express framework for handling server-side logic. |
| 10 | +- **Database:** MongoDB managed with Mongoose ORM for efficient data storage and retrieval. |
| 11 | +- **Frontend:** EJS for templating, Bootstrap for responsive design, and Vanilla JS for client-side functionality. |
| 12 | +- **AI Integration:** OpenAI for content moderation and writing assistance. |
| 13 | +- **Additional Libraries:** bcrypt for password hashing, multer for file uploads, and social-share-js for social media sharing. |
| 14 | + |
| 15 | +The project structure includes: |
| 16 | + |
| 17 | +- **Models:** Mongoose schemas for User, Article, and Comment. |
| 18 | +- **Routes:** Express routes for authentication, article management, and API endpoints. |
| 19 | +- **Views:** EJS templates for rendering pages. |
| 20 | +- **Public:** Static files including CSS, JavaScript, and images. |
| 21 | +- **Services:** Helper services for AI interactions and file uploads. |
| 22 | +- **Middleware:** Authentication middleware for protecting routes. |
21 | 23 |
|
22 | 24 | ## Features
|
23 | 25 |
|
24 |
| -PythaSpace includes the following features: |
25 |
| -1. **User Registration and Login**: |
26 |
| - - Users can register and log in using their email. |
| 26 | +PythaSpace offers a wide range of features to enhance the user experience: |
| 27 | + |
| 28 | +1. **User Registration and Login:** |
| 29 | + - Users can register and log in using their email and password. |
27 | 30 | - Essential for publishing, commenting, and utilizing the AI writer helper.
|
28 | 31 |
|
29 |
| -2. **Article Publishing**: |
30 |
| - - Support for multimedia content (images and videos) with specified size and format restrictions. |
31 |
| - - AI-powered moderation using OpenAI, with each user's API key stored in their user profile. |
32 |
| - - Articles automatically published upon passing AI moderation; issues highlighted otherwise. |
| 32 | +2. **Article Publishing:** |
| 33 | + - Support for multimedia content (images and videos). |
| 34 | + - AI-powered moderation using OpenAI. |
| 35 | + - Articles can be saved as drafts or published directly. |
| 36 | + - Moderation issues are highlighted for user correction. |
33 | 37 |
|
34 |
| -3. **Article Organization**: |
35 |
| - - Categories: Technology, Science, Health & Wellness, Business & Finance, Arts & Culture, Lifestyle. |
36 |
| - - Tags: Specific Topics, Writing Styles, Target Audience, Content Format. |
| 38 | +3. **Article Organization:** |
| 39 | + - Articles are categorized into Technology, Science, Health & Wellness, Business & Finance, Arts & Culture, and Lifestyle. |
| 40 | + - Tagging system for specific topics, writing styles, and content formats. |
37 | 41 |
|
38 |
| -4. **Commenting System**: |
39 |
| - - Single-level comments on articles. |
| 42 | +4. **Commenting System:** |
| 43 | + - Single-level comments on articles to foster discussions. |
40 | 44 |
|
41 |
| -5. **Social Sharing**: |
42 |
| - - Integration with social-share-js for sharing articles on social media. |
| 45 | +5. **Social Sharing:** |
| 46 | + - Integration with social-share-js for sharing articles on social media platforms. |
43 | 47 |
|
44 |
| -6. **AI Writer Helper ("Magic Helper")**: |
45 |
| - - Offers writing suggestions based on the title and existing content. |
46 |
| - - Utilizes the user's OpenAI API key stored in their profile for generating suggestions. |
47 |
| - - Accessible via a modern, intuitive interface with a magic wand icon. |
| 48 | +6. **AI Writer Helper ("Magic Helper"):** |
| 49 | + - Provides writing suggestions based on the title and existing content. |
| 50 | + - Utilizes the user's OpenAI API key for generating suggestions. |
48 | 51 |
|
49 | 52 | ## Getting started
|
50 | 53 |
|
51 | 54 | ### Requirements
|
52 | 55 |
|
53 |
| -To run PythaSpace, you need the following technologies installed on your computer: |
| 56 | +To run PythaSpace, ensure you have the following technologies installed on your computer: |
| 57 | + |
54 | 58 | - Node.js
|
55 | 59 | - MongoDB (or use a cloud version like MongoDB Atlas)
|
56 | 60 |
|
57 | 61 | ### Quickstart
|
58 | 62 |
|
59 |
| -1. **Clone the repository**: |
60 |
| - ```sh |
| 63 | +Follow these steps to set up and run the project: |
| 64 | + |
| 65 | +1. **Clone the repository:** |
| 66 | + ```bash |
61 | 67 | git clone <repository-url>
|
62 | 68 | cd PythaSpace
|
63 | 69 | ```
|
64 | 70 |
|
65 |
| -2. **Install dependencies**: |
66 |
| - ```sh |
| 71 | +2. **Install dependencies:** |
| 72 | + ```bash |
67 | 73 | npm install
|
68 | 74 | ```
|
69 | 75 |
|
70 |
| -3. **Set up environment variables**: |
71 |
| - - Copy `.env.example` to `.env` and fill in the required values: |
72 |
| - ```sh |
73 |
| - cp .env.example .env |
74 |
| - ``` |
| 76 | +3. **Set up environment variables:** |
| 77 | + - Create a `.env` file in the project root using the provided `.env.example` as a template. |
| 78 | + - Populate the `.env` file with your values (e.g., MongoDB URL, session secret). |
75 | 79 |
|
76 |
| -4. **Start the application**: |
77 |
| - ```sh |
| 80 | +4. **Start the application:** |
| 81 | + ```bash |
78 | 82 | npm start
|
79 | 83 | ```
|
80 | 84 |
|
81 |
| -5. **Access the application**: |
82 |
| - - Open your browser and navigate to `http://localhost:3000` |
| 85 | +5. **Access the application:** |
| 86 | + - Open your browser and navigate to `http://localhost:3000` to start using PythaSpace. |
83 | 87 |
|
84 | 88 | ### License
|
85 | 89 |
|
86 |
| -The project is proprietary (not open source), just output the standard Copyright (c) 2024. |
| 90 | +The project is proprietary (not open source), and all rights are reserved. |
| 91 | + |
| 92 | +``` |
| 93 | +© 2024 PythaSpace. |
87 | 94 | ```
|
0 commit comments