Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhistiak3/mindscribe
MindScribe is a dynamic blog application where users can log in to create and share their thoughts through blogs.
https://github.com/mhistiak3/mindscribe
Last synced: 1 day ago
JSON representation
MindScribe is a dynamic blog application where users can log in to create and share their thoughts through blogs.
- Host: GitHub
- URL: https://github.com/mhistiak3/mindscribe
- Owner: mhistiak3
- License: apache-2.0
- Created: 2024-08-11T09:30:37.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-09-16T08:04:00.000Z (2 months ago)
- Last Synced: 2024-09-17T08:45:08.105Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 248 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MindScribe
**MindScribe** is a blog application where users can share their thoughts via blog posts. Built using **Node.js**, **Express.js**, **MongoDB**, and **EJS**, it supports user authentication, session management, and blog operations.
## Table of Contents
- [Features](#features)
- [Technologies](#technologies)
- [Installation](#installation)
- [Usage](#usage)
- [API Endpoints](#api-endpoints)
- [Environment Variables](#environment-variables)
- [Contributing](#contributing)
- [License](#license)## Features
- **User Authentication**: Register, log in, and log out functionality.
- **Blog Management**: Create, update, delete, and view blogs.
- **Public Access**: Blogs are publicly accessible without login.
- **Profile Management**: Users can update their profiles and settings.
- **Reading List**: Authenticated users can manage a reading list.
- **Image Uploads**: Cloudinary is used to manage images for blogs.
- **Session Management**: Sessions are managed using `connect-mongo` for persistent storage.
- **Dashboard**: Authenticated users can access their personalized dashboard.
## Technologies
- **Node.js**: Backend runtime environment.
- **Express.js**: Framework for routing and middleware handling.
- **MongoDB**: Database for user and blog data.
- **Mongoose**: ODM for MongoDB.
- **EJS**: Templating engine.
- **Cloudinary**: For managing image uploads.
- **connect-mongo**: Session store for managing sessions.
- **express-session**: Session store for managing sessions.## Installation
1. Clone the repository:
```bash
git clone https://github.com/mhistiak3/MindScribe.git
cd MindScribe
```
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file in the root directory with the following values:
```bash
MONGO_CONNECTION_URL=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
SESSION_SECRET=
SESSION_MAX_AGE=86400000 # Session expiry in ms
APP_PORT=3000
```4. Start the application:
```bash
npm start
```
The app will be accessible at `http://localhost:3000`.## Usage
- **Public**: Users can view blogs without registering.
- **Registered Users**: Can create, update, and delete their blogs.
- **Profile Settings**: Users can manage their profile and settings.## API Endpoints
### Public Routes
| Method | Endpoint | Description |
|--------|------------------|-------------------------------------|
| `GET` | `/` | Home page - View all blogs |
| `GET` | `/blogs/:id` | View blog details by ID |
| `GET` | `/register` | Register form |
| `POST` | `/register` | Register a new user |
| `GET` | `/login` | Login form |
| `POST` | `/login` | Log in a user |
| `GET` | `/profile` | View and manage profile |### Authenticated Routes (require login)
| Method | Endpoint | Description |
|--------|-----------------------|--------------------------------------|
| `GET` | `/logout` | Log out a user |
| `GET` | `/createblog` | Show blog creation form |
| `POST` | `/createblog` | Create a new blog |
| `GET` | `/readinglist` | View reading list |
| `GET` | `/dashboard` | Access user dashboard |
| `GET` | `/settings` | View and update user settings |
| `PUT` | `/blogs/:id` | Update a blog by ID |
| `DELETE` | `/blogs/:id` | Delete a blog by ID |## Environment Variables
Ensure to set the following environment variables:
- `MONGO_CONNECTION_URL`: MongoDB connection string.
- `CLOUDINARY_CLOUD_NAME`: Cloudinary cloud name.
- `CLOUDINARY_API_KEY`: Cloudinary API key.
- `CLOUDINARY_API_SECRET`: Cloudinary API secret.
- `SESSION_SECRET`: Secret for session signing.
- `SESSION_MAX_AGE`: Session expiration time in milliseconds.
- `APP_PORT`: The port on which the app will run.## Dependencies
The project uses the following packages:
- **bcrypt**: ^5.1.1 - For hashing passwords.
- **cloudinary**: ^2.4.0 - To handle image uploads.
- **compression**: ^1.7.4 - For compressing the response bodies.
- **connect-mongo**: ^5.1.0 - To store session data in MongoDB.
- **dotenv**: ^16.4.5 - To load environment variables.
- **ejs**: ^3.1.10 - For rendering views.
- **express**: ^4.19.2 - Node.js web framework.
- **express-session**: ^1.18.0 - Session middleware for Express.
- **highlight.js**: ^11.10.0 - Syntax highlighting for code in Markdown.
- **markdown-it**: ^14.1.0 - Markdown parser.
- **mongoose**: ^8.5.2 - MongoDB ODM.## Contributing
Feel free to contribute by opening issues or creating pull requests.## License
This project is licensed under the MIT License.---
Developed by [Istiak Ahammad](https://github.com/mhistiak3).