π Live Site
Kiriong is a comprehensive Django-based Progressive Web Application (PWA) connecting Nigerian artisans with customers. It features an innovative AI-powered learning academy, a community blog, and intelligent customer service to create a complete ecosystem for artisan growth.
- π Marketplace: Service listings with a booking system, ML-based service recommendations, and artisan dashboards.
- π AI Academy: Personalized learning pathways powered by Google Gemini, progress tracking, AI tutoring, and downloadable PDF certificates.
- π€ AI Customer Service: A 24/7 Gemini-powered chatbot with quick help guides and conversation history.
- π Community Blog: A rich content platform using CKEditor 5 for posts, complete with a commenting system.
- π Real-Time Engagement: In-app notifications and Web Push API for real-time alerts (excluding iOS).
- π¨ Modern User Experience: A mobile-first, responsive PWA with a dark/light mode toggle and multi-language support (English, Hausa, Igbo, Yoruba).
- π€ Robust User System: Secure sign-up with reCAPTCHA, Google OAuth, a username-based referral system, and detailed user profiles.
Kiriong is built using a Django Monolithic Architecture, where each major feature is isolated into a modular Django app for a clear separation of concerns. This approach streamlines development and deployment for the current scale.
- AI & Machine Learning: We use Google Gemini for its cost-effectiveness and quality in generating learning pathways, module content, and powering our AI chatbot. Service recommendations are driven by a content-based filtering system using TF-IDF and cosine similarity.
- Data & Media: The application is designed for a PostgreSQL production database and integrates with Cloudinary for optimized media storage. WeasyPrint is used for generating PDF certificates on the fly.
- Backend Services: Transactional emails (confirmations, verification, etc.) are reliably handled by Brevo (Sendinblue) through
django-anymail. - Design Philosophy: We chose a PWA over a native app to ensure a single codebase provides a native-like experience across all devices without app store delays, which is ideal for the Nigerian market.
- Backend: Django 5.0.6, PostgreSQL, Gunicorn
- Frontend: Bootstrap 5.3.3, Vanilla JS, CKEditor 5
- AI & APIs: Google Gemini, YouTube Data API v3
- Services: Brevo (email), Cloudinary (media), Google OAuth, reCAPTCHA
- ML: Scikit-learn
- PDF Generation: WeasyPrint
git clone https://github.com/nwokike/kiriong.git
cd kiriong
pip install -r requirements.txtCreate a .env file in the root directory and add the necessary keys.
SECRET_KEY=your-django-secret-key
DEBUG=True
DATABASE_URL=postgresql://user:password@host:port/database
# AI & APIs
GEMINI_API_KEY=your-gemini-api-key
YOUTUBE_API_KEY=your-youtube-api-key
# Email
BREVO_API_KEY=your-brevo-api-key
DEFAULT_FROM_EMAIL=noreply@kiri.ng
# Media Storage
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
# Google OAuth (optional)
GOOGLE_OAUTH_CLIENT_ID=your-client-id
GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret
# reCAPTCHA (optional)
RECAPTCHA_PUBLIC_KEY=your-site-key
RECAPTCHA_PRIVATE_KEY=your-secret-keypython manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic --noinputpython manage.py runserver 0.0.0.0:5000Visit http://localhost:5000 in your browser.
kiriong/
βββ .github/
β βββ workflows/
β βββ deploy.yml # CI/CD pipeline for automated deployments
βββ academy/ # App: AI-powered learning platform
β βββ migrations/ # Database schema changes for the academy
β βββ templates/
β β βββ academy/ # Templates specific to the academy
β β βββ academy_home.html
β β βββ certificate.html
β β βββ create_pathway.html
β β βββ dashboard.html
β β βββ pathway_detail.html
β β βββ pathway_list.html
β β βββ public_pathway_detail.html
β βββ templatetags/ # Custom template filters and tags
β βββ admin.py # Django admin configuration for academy models
β βββ ai_services.py # Handles all Google Gemini AI integrations
β βββ apps.py # App-specific configuration
β βββ forms.py # Forms for pathway creation, quizzes, etc.
β βββ models.py # Data models (LearningPathway, Module, Badge)
β βββ urls.py # URL routing for the academy
β βββ views.py # Logic for handling requests and rendering pages
βββ blog/ # App: Community blogging platform
β βββ migrations/
β βββ templates/
β β βββ blog/
β β βββ post_detail.html
β β βββ post_form.html
β β βββ post_list.html
β βββ admin.py
β βββ apps.py
β βββ forms.py # Contains the CKEditor 5 form integration
β βββ models.py # Data models (Post, Comment)
β βββ urls.py
β βββ views.py
βββ core/ # App: Core functionality and shared components
β βββ migrations/
β βββ templates/
β β βββ core/
β β βββ base.html # The master base template for the entire site
β β βββ privacy.html
β β βββ terms.html
β βββ context_processors.py # Provides global context (e.g., notification count)
β βββ urls.py
β βββ views.py # Handles homepage, AI chatbot logic, etc.
βββ kiriong/ # Main Django project configuration
β βββ asgi.py # ASGI entrypoint for async servers
β βββ settings.py # Core project settings and configurations
β βββ urls.py # Root URL configuration for the project
β βββ wsgi.py # WSGI entrypoint for traditional servers
βββ marketplace/ # App: Artisan services and bookings
β βββ migrations/
β βββ templates/
β β βββ marketplace/
β β βββ artisan_dashboard.html
β β βββ booking_notification_email.html
β β βββ service_confirm_delete.html
β β βββ service_detail.html
β β βββ service_form.html
β β βββ service_list.html
β βββ templatetags/
β βββ models.py # Data models (Category, Service, Booking)
β βββ recommender.py # ML logic for service recommendations
β βββ urls.py
β βββ views.py
βββ media/ # User-uploaded files (development)
βββ notifications/ # App: In-app user notifications
β βββ migrations/
β βββ templates/
β β βββ notifications/
β β βββ notification_list.html
β βββ models.py # Data model (Notification)
β βββ urls.py
β βββ views.py
βββ static/ # Development static files (CSS, JS, images)
β βββ css/
β β βββ style.css
β βββ images/
β β βββ icons/
β β βββ logo-dark.png
β β βββ logo.png
β βββ js/
β β βββ dashboard.js
β β βββ theme-toggle.js
β βββ manifest.json # PWA manifest file
β βββ service-worker.js # PWA service worker for offline capabilities
βββ staticfiles/ # Collected static files for production
βββ templates/ # Global templates (not tied to a specific app)
β βββ account/ # Templates for django-allauth
β βββ registration/ # Templates for Django's built-in auth
β βββ email_base.html
βββ users/ # App: User management, profiles, and authentication
β βββ migrations/
β βββ templates/
β β βββ users/
β β βββ certificates.html
β β βββ profile_detail.html
β β βββ profile_edit.html
β βββ models.py # Custom Profile model, Certificate, SocialMediaLink
β βββ urls.py
β βββ views.py
βββ .gitignore # Specifies files and folders for Git to ignore
βββ README.md # This file
βββ build.sh # Script for production builds (collectstatic, migrations)
βββ manage.py # Django's command-line utility
βββ requirements.txt # List of all Python package dependencies
- Built-in CSRF protection and secure password hashing.
- Email verification for new user accounts.
- Google reCAPTCHA v2 to prevent bot abuse.
- Protection against XSS and SQL injection via Django's core features.
- HTTPS is enforced in production environments.
