SimorghCMS is a modern, fast, and user-friendly Content Management System inspired by WordPress. This CMS is built using modern technologies like FastAPI and provides advanced features such as user management, articles, categories, and comments management.
- β JWT Authentication System
- β User Management with Different Roles (Admin, Editor, Author, Subscriber)
- β Create, Edit, and Delete Articles
- β Article Categorization and Tagging
- β Comment System with Status Management
- β Media File Upload and Management
- β Documented API with Swagger and ReDoc
- β Asynchronous Database with SQLAlchemy
- β High Security and Data Validation
- β Responsive and Modern Design
- β Advanced User Dashboard
- β Article and Comment Management
- β User Profile Management
- β Multi-language Support (Persian/English)
- β High Performance and Speed
- β No Heavy Framework Dependencies
- β Clean and Intuitive User Interface
- FastAPI - High-performance Python web framework
- SQLAlchemy - Python ORM for database operations
- SQLite - Lightweight and portable database
- JWT - Secure tokens for authentication
- Alembic - Database migration tool
- Pydantic - Data validation and settings management
- HTML5 - Markup language for web pages
- CSS3 - Styling and responsive design
- JavaScript (ES6+) - Client-side scripting
- Fetch API - Modern HTTP client for API calls
- No Framework Dependencies - Pure vanilla JavaScript
- Python 3.8+
- pip
- Git
# Clone the repository
git clone https://github.com/yourusername/SimorghCMS.git
cd SimorghCMS
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create database
alembic revision --autogenerate -m "Initial migration"
alembic upgrade head
# Run development server
uvicorn app.main:app --reload
# Server will be available at http://localhost:8000
# Create static directory for frontend files
mkdir -p static/frontend
# Copy frontend files to static directory
cp -r frontend/* static/frontend/
# From the project root directory
python -m http.server 3000
# Frontend will be available at http://localhost:3000
After starting the server, you can access the API documentation:
- Swagger UI:
http://localhost:8000/api/docs
- ReDoc:
http://localhost:8000/api/redoc
SimorghCMS/
βββ app/
β βββ api/ # API endpoints
β βββ core/ # Core configurations and security
β βββ crud/ # Database operations
β βββ database/ # Database configuration
β βββ models/ # Database models
β βββ schemas/ # Pydantic schemas
β βββ main.py # Main application file
βββ frontend/ # Frontend files (lightweight version)
βββ static/ # Static files
βββ alembic/ # Migration files
βββ requirements.txt # Python dependencies
βββ README.md # This file
Create a .env
file in the project root:
DATABASE_URL=sqlite+aiosqlite:///./cms.db
SECRET_KEY=your-super-secret-key-change-this-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Build and run with Docker
docker-compose up --build
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /api/ {
proxy_pass http://127.0.0.1:8000;
}
}
After first run, create an admin user:
- Visit
http://localhost:8000
- Click on "Register"
- Enter your user information
- Change the user role to "admin" in the database
- Log in to your account
- Go to the dashboard
- Click on "Create New Article"
- Enter article information and publish
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the GNU License. See the LICENSE file for details.
SimorghCMS Project - @shythonx - shayanheidari01@gmail.com
Project Link: SimorghCMS
Made with β€οΈ and Python
Β© 2023 SimorghCMS. All rights reserved.