Educa is a comprehensive Django-based project integrating an eLearning platform with a blog system, an online shop and a social platform.
- Course creation and management
- Multiple content types support (text, video, files)
- Student enrollment and progress tracking
- Interactive course discussion forums
- Real-time chat functionality for students and instructors
- Multi-author blog support
- Advanced tagging system
- RSS feeds
- Similar posts suggestions
- Markdown support for posts
- Comment system with threading
- Post sharing via email
- Image bookmarking from any website
- Custom bookmarklet for easy saving
- AJAX-powered infinite scroll
- Social following system
- Activity stream for users
- Image likes and favorites
- Product catalog with categories
- Shopping cart using Django sessions
- Order management system
- Payment integration (Stripe/PayPal)
- PDF invoice generation
- Product recommendations
- Digital product delivery
- Python 3.10+
- PostgreSQL (database)
- Redis (caching)
- RabbitMQ (async)
- WeasyPrint (pdf)
- Clone the repository:
git clone https://github.com/jjokah/educa.git
cd educa
- Create and activate virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On Windows: `source .venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
touch .env # On Windows: `New-Item .env`
Edit .env
file with your production/development settings
Key settings in .env
:
DEBUG=True
DJANGO_SECRET_KEY=your-secret-key
ALLOWED_HOSTS=127.0.0.1,localhost,0.0.0.0,your-ngrok-domin-name.ngrok.app,your-domin-name.com
CSRF_TRUSTED_ORIGINS=https://your-ngrok-domain-name.ngrok-free.app,https://your-domin-name.com
DATABASE_ENGINE=django.db.backends.postgresql
DATABASE_NAME=your-db-name
DATABASE_USER=your-db-user
DATABASE_PASSWORD=your-db-password
DATABASE_HOST=localhost
DATABASE_POST=5432
REDIS_HOST=localhost
REDIS_POST=6379
REDIS_DB=0
[email protected]
[email protected]
MAILGUN_API_KEY=your-mailgun-api-key
MAILGUN_SENDER_DOMAIN=mg.your-domain-name.com
PAYSTACK_SECRET_KEY=your-paystack-secret-key
PAYSTACK_PAYMENT_URL=your-paystack-url
- Initialize the database:
python manage.py migrate
python manage.py createsuperuser
python manage.py loaddata initial_data.json
- Start services:
redis-server
celery -A educa worker -l info
python manage.py runserver
educa/
├── account/ # User management
├── actions/ # Tracking user activities
├── blog/ # Blog system
├── cart/ # Shopping cart functionalities
├── coupons/ # Handles discount coupons
├── courses/ # App for managing courses
├── demo/ # Includes demonstration content
├── educa/ # Project core configurations
├── images/ # Social bookmarking
├── orders/ # Manages customer orders
├── payment/ # Handles payment processing
├── shop/ # Online shop
├── static/ # Static assets (CSS, JS, images)
├── templates/ # HTML templates for the frontend
.
Blog:
- post list, post details
- pagination, post comments, email sharing
- tagging, markdown, sitemap, RSS feed, search engine
__
Social:
- user account
- social authentication
- bookmarking, liking, infinite scroll
- track user actions
__
Shop:
- product listing, shopping cart, order creation
- ordering management, payment integration
- coupon system, recommendation engine
- internationalization
__
E-Learning:
- content management system
- rendering and caching content
- API views and end points
- chat server
-
Frontend:
- HTML/CSS
- JavaScript/jQuery
- AJAX for dynamic loading
- Custom bookmarklet
-
Backend:
- Django
- Django Channels
- Django REST framework
- Celery
- Redis
- PostgreSQL
-
Additional Tools:
- Pillow for image processing
- WeasyPrint for PDF generation
- WebSockets for real-time features
- django-taggit for tagging
- Easy-thumbnails for image thumbnails
- Google OAuth2 for social authentication
- Paystack for payment
- Mailgun for mailing
Deployment instructions for production:
- Set up server with required dependencies
- Configure nginx/gunicorn
- Set up SSL certificates
- Configure PostgreSQL
- Set up Redis and Celery
- Set up Mailgun
- Set up GoogleAuth
- Set up Paystack
- Configure static/media files serving
- Set environment variables
Thanks to the Antonio Melé for his book - Django By Example, which this project is based on.