-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Happy Felix Chukwuma edited this page Aug 16, 2024
·
7 revisions
The 2077-CMS project is a custom-built content management system (CMS) designed to manage and publish articles with advanced features such as scheduling, filtering by status, and integration with external services like Redis, Celery, and Mailchimp. The project is structured with a Django backend and uses Django REST Framework (DRF) for API development.
- Articles have two statuses: Draft and Ready.
- Only articles with the Ready status are rendered on the client-side.
- Ability to schedule status changes from Draft to Ready.
- Articles are associated with authors, with the first author automatically populated as the logged-in user.
- The system uses UUIDs for article IDs to ensure uniqueness and security.
- Users can subscribe to a newsletter where article threads are automatically sent to their email addresses.
- Mailchimp is used for handling newsletters, including subscription management and email delivery.
- Users have the ability to unsubscribe from the newsletter.
- The project utilizes Celery and Celery Beat to manage background tasks such as publishing scheduled articles.
- Tasks are scheduled using crontab, intervals, or solar events through the Django admin interface.
- Redis is configured as the broker for Celery tasks.
- The project uses separate settings for development and production environments.
- Environment variables are managed using a
.env
file, withDJANGO_SETTINGS_MODULE
switched betweencore.config.local
for development andcore.config.production
for production. - A Redis server runs on port 6378 on the VPS, while another instance runs on the default port 6379 for local development.
- The project is deployed on a VPS using Gunicorn as the WSGI server and Supervisor to manage processes.
- Nginx serves as the reverse proxy for Gunicorn.
- Redis is used for caching and as the broker for Celery tasks.
- Models are defined using UUIDs and slugs.
- Custom admin configurations are used to handle complex relationships like many-to-many associations between articles and categories.
- The
celery.py
configuration dynamically switches between local and production settings based on the environment. - Celery Beat is used for scheduling tasks, with periodic tasks defined directly in the code.
- Two instances of Redis are running, with one configured on port 6378 to avoid conflicts with the default Redis instance on port 6379.
- Background saving and snapshotting are carefully managed to avoid performance issues and data loss.
- Mailchimp API is used to manage email lists and send newsletters.
- Users can subscribe and unsubscribe from newsletters through the CMS interface.
- The Django admin interface allows for management of periodic tasks, clocked tasks, crontabs, intervals, and solar events.
- Administrators can configure task schedules without directly modifying code.
- Non-essential models related to periodic tasks, such as Clocked, Crontabs, Intervals, and Solar events, are hidden from the admin dashboard to simplify the interface.
- Always ensure that
DJANGO_SETTINGS_MODULE
is correctly set in the environment variables to prevent configuration issues. - Use
systemctl daemon-reload
after making changes to systemd service files, and always monitor the impact of these changes.
- Monitor Celery and Celery Beat using Supervisor, ensuring that logs are properly configured and accessible.
- Running multiple Redis instances can increase server resource usage. Monitor the performance impact and ensure that the system is not overburdened by unnecessary processes.
- Consider integrating a feature that allows Mailchimp to generate email content from articles across multiple projects.
- Explore further optimizations for Redis and Celery to improve performance, especially under high load conditions.
This wiki serves as the primary documentation for the 2077-CMS project. It should be updated as new features are added or existing ones are modified.
- Happy Felix Chukwuma - Lead Developer
- Ayomide Alonge - [Contributor]
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions, issues, or suggestions, please open an issue on GitHub.
© 2024 2077-CMS Project. All rights reserved.