Empowering community collaboration and innovation through GNOME Nepal.
The GNOME Nepal backend server is an ongoing project aimed at building a robust and scalable platform for the GNOME Nepal community. This project focuses on simplifying app deployment and development through the use of Docker while ensuring ease of configuration and setup, with long-term goals of production readiness.
We are working to streamline the architecture to efficiently handle APIs, background task processing, and database management, leveraging modern technologies such as Django, Celery, and Redis.
The GNOME Nepal backend server project is intended to make Django app setup and configuration quick and beginner-friendly. By using Docker and other modern technologies, developers can get the server running with minimal manual intervention. The platform serves as a great starting point for learning about the internals of Django and will be expanded to production-grade architecture in the future.
Djate is an integral part of the GNOME Nepal backend server. It serves as a simple and efficient Django template to assist in creating backend services. Djate focuses on eliminating the complexity of setting up essential components such as Django REST Framework
, Celery
, celery-backend
, flower
and Redis
by automating these tasks through a single command.
Djate follows a standard Django project structure with apps
and manage.py
in the root directory. Each app contains components such as views.py
, models.py
, and urls.py
, while Celery tasks are defined in tasks.py
for each application.
The code architecture leverages Django REST Framework (DRF) generics and viewsets for building APIs efficiently, ensuring modularity and efficiency in development.
The physical architecture of Djate is designed to handle task management and background processes efficiently using Redis and Celery. Below is the architecture diagram for how tasks are processed within the Djate setup:
Fig: The architecture includes Django for the web layer, Redis for the message queue, Celery for task processing, and Flower for task monitoring.
The webserver runs on Django and comes pre-packaged with Django REST Framework (DRF), drf_yasg
for API documentation, and other essential tools. All dependencies are specified in the requirements.txt.
Djate default database is SQLite as its lightweight nature, which makes it ideal for quick testing. However, we currently uses PostgreSQL as the default database for more flexibility in data types, scalability, concurrency, and data integrity.
Redis is used as the message queue for Celery, managing background tasks efficiently.
Flower is included for monitoring Celery tasks, accessible at http://localhost:7777
using:
- Username: admin
- Password: pswd
Djate simplifies Django app setup by integrating:
- Django: A high-level Python web framework.
- Django REST Framework (DRF): For building Web APIs.
- Celery: For asynchronous background tasks.
- Redis: As a message broker for Celery.
- Flower: A web-based tool for monitoring Celery tasks.
- Docker: Used to containerize the application for easy deployment and testing.
To get started with Djate:
-
Clone the repository:
git clone https://github.com/GNOME-Nepal/site-server.git cd site-server
-
Build and run using Docker Compose:
docker-compose up --build
-
Open your browser at
http://localhost:8000
to view the web app. -
Access Flower for task monitoring at
http://localhost:7777
using the default credentials:[Only when you run via docker compose]- Username:
admin
- Password:
pswd
- Username:
As part of the GNOME Nepal backend server, we are planning to incorporate the following features for community engagement and operational needs:
- Newsletter System: For sending invites and announcements.
- Admin Panel: Managed through Django's built-in capabilities.
- Event Management Backend: Schedule and manage community events.
- Blogs: Community members can document events or share thoughts.
- RBAC System: Implementing Role-Based Access Control with Django.
- Member Lookup: Ability for staff contributors to look up members.
- Blog Submission: Contributors can submit blogs, with super admins verifying content.
We welcome contributions to enhance this project. Whether you're fixing bugs, adding new features, or improving documentation, your help is appreciated. To contribute to this project, follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your branch to your forked repository.
- Submit a pull request detailing your changes.
(Note: Before contributing read the detailed guidelines for contributions)
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or assistance, please reach out to:
- Support: GNOME
- GitHub: GNOME Nepal
We would like to thank all contributors and the GNOME community for their support and resources.