Postopia is a full-stack blogging platform built with React, Node.js, and MongoDB. It features user authentication, post creation & editing, dark/light mode toggle, and dynamic related post suggestions. Ideal for personal blogging, portfolio integration, and learning full-stack development. π
- π Responsive Design: Tailored for all devices with Tailwind CSS.
- βοΈ Rich Text Editor: Create stunning blogs with a powerful editor.
- π Dark Mode: Write comfortably, day or night.
- π User Authentication: Secure login and registration with JWT.
- π Blog Management: Create, edit, and delete blogs with ease.
- π Category & Search: Filter blogs by category or search for specific content.
- π οΈ RESTful API: Built with Express.js for seamless communication.
- ποΈ MongoDB Integration: Securely store user and blog data.
- π Authentication: JWT-based authentication for secure access.
- π File Uploads: Upload and manage images effortlessly.
- π² React Native: Access Postopia on the go.
- π Expo: Simplified development and deployment for iOS and Android.
The project is organized into three main directories: backend, frontend, and postoPiaApp (mobile app). Below is an overview of the structure:
π backend/
βββ π .env # Environment variables
βββ π app.js # Main server file
βββ π config/ # Configuration files
β βββ mongo-connection.js # MongoDB connection setup
βββ π controllers/ # API controllers
β βββ authController.js # Authentication logic
β βββ postController.js # Blog post logic
βββ π models/ # Mongoose models
βββ π routes/ # API routes
βββ π middleware/ # Middleware (e.g., authentication)
π frontend/
βββ π src/
β βββ π components/ # Reusable UI components
β βββ π pages/ # Application pages (e.g., Login, Dashboard)
β βββ π context/ # React context for state management
β βββ π utils/ # Utility functions
β βββ π assets/ # Static assets (e.g., images, icons)
βββ π public/ # Public files (e.g., index.html)
βββ π .env # Environment variables for the frontend
π postoPiaApp/
βββ π src/
β βββ π components/ # Reusable components for the mobile app
β βββ π screens/ # App screens (e.g., Home, Profile)
β βββ π navigation/ # Navigation setup (React Navigation)
β βββ π assets/ # Static assets for the mobile app
βββ π App.js # Main entry point for the mobile app
backend/: Contains the server-side logic, including API routes, controllers, and database models.frontend/: Houses the React-based web application with reusable components and pages.postoPiaApp/: The mobile app built with React Native and Expo for iOS and Android platforms.
- Navigate to the
backenddirectory:cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackenddirectory and add:MONGODB_URI=<your-mongodb-uri> ACCESS_JWT_KEY=<your-access-jwt-key> REFRESH_JWT_KEY=<your-refresh-jwt-key> - Start the server:
npm start
- Navigate to the
frontenddirectory:cd frontend - Install dependencies:
npm install
- Create a
.envfile in thefrontenddirectory and add:VITE_API_URL=http://localhost:3000 - Start the development server:
npm run dev
- Navigate to the
postoPiaAppdirectory:cd postoPiaApp - Install dependencies:
npm install
- Start the Expo development server:
npm start
The backend is configured for deployment on Vercel. Ensure the vercel.json file is present in the backend directory:
{
"version": 2,
"builds": [
{
"src": "app.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/app.js"
}
]
}The frontend is built using Vite and can be deployed on platforms like Vercel or Netlify. Build the project with:
npm run build- React
- Tailwind CSS
- React Router
- React Quill
- Node.js
- Express.js
- MongoDB
- Multer
- JWT
- React Native
- Expo
We welcome contributions! Follow these steps to get started:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name" - Push to the branch:
git push origin feature-name
- Open a pull request.
- Kritik Hedau [App Development]
- Shakti Tamrakar [Web Development]
π Thank you for visiting Postopia! We can't wait to see what you'll create.