Skip to content

khaledhawil/Full-DevOps-Project-islamic-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

86 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Islamic App - Full-Stack Application with Enterprise DevOps

Build Status Docker Kubernetes ArgoCD

A production-ready Islamic application built with modern full-stack technologies and enterprise-grade DevOps practices. This project demonstrates comprehensive CI/CD automation, containerization, Kubernetes orchestration, and GitOps deployment methodologies while serving the Muslim community with essential digital Islamic tools.

Developer Information

Khaled Hawil

Project Overview

The Islamic App is a full-stack web application that combines traditional Islamic resources with cutting-edge technology to provide an accessible platform for worship, learning, and spiritual growth. Built with modern architecture principles and enterprise DevOps practices, this project serves as both a functional application and a demonstration of professional software development and deployment practices.

Key Objectives

  • Digital Islamic Tools: Prayer times, Quran reader, Hadith collections, digital Tasbeh
  • DevOps Excellence: Complete CI/CD pipeline with automated testing and deployment
  • Scalability: Kubernetes-native architecture with auto-scaling capabilities
  • Security: Integrated security scanning and best practices
  • Maintainability: Comprehensive documentation and monitoring

Documentation Hub

This project includes extensive documentation for all components:

Component Documentation Description
Overview DEVOPS_GUIDE.md Complete DevOps architecture and workflows
File Reference FILE_INDEX.md Comprehensive file-by-file documentation
Frontend frontend/BUILD.md React TypeScript build instructions
Backend backend/BUILD.md Flask API build and deployment
Database database/DATABASE.md PostgreSQL setup and management
Docker docker-compose.md Container orchestration guide
Jenkins Jenkinsfile.md CI/CD pipeline documentation
Kubernetes k8s/k8s-documentation.md Container orchestration
ArgoCD argocd/argocd-documentation.md GitOps deployment
Nginx nginx/nginx-documentation.md Load balancer configuration
Scripts k8s/SCRIPTS.md Deployment automation scripts
๐Ÿ“‹ Application Features

Islamic Functionality

  • Digital Tasbeh Counter: Advanced counter with achievement system and progress tracking
  • Quran Reader: Complete Quran with Arabic text, translations, and search functionality
  • Quran Audio: High-quality recitations with multiple reciters and playback controls
  • Hadith Collection: Searchable database with authentic hadiths from major collections
  • Prayer Times: Location-based prayer time calculations with notifications
  • Azkar and Duas: Collection of Islamic supplications and daily remembrances
  • User Profiles: Personal settings, preferences, and spiritual progress tracking
  • Islamic Calendar: Hijri calendar integration with important Islamic dates

Technical Features

  • Responsive Design: Mobile-first approach with cross-device compatibility
  • Theme Support: Dark/light mode with user preferences
  • Secure Authentication: JWT-based authentication with user management
  • Performance Optimization: Lazy loading, caching, and optimized bundle sizes
  • Multi-language Support: Internationalization for global Muslim community
  • Accessibility: WCAG compliant design for inclusive user experience

DevOps Infrastructure

  • Containerization: Docker containers for all services with multi-stage builds
  • Orchestration: Kubernetes deployment with auto-scaling and self-healing
  • CI/CD Pipeline: Jenkins automated build, test, and deployment
  • GitOps: ArgoCD for continuous delivery and configuration management
  • Load Balancing: Nginx reverse proxy with SSL termination
  • Database: PostgreSQL with persistent storage and automated backups
  • Security Scanning: Trivy vulnerability assessment in CI/CD pipeline
  • Monitoring: Application health checks and performance monitoring
๐Ÿ—๏ธ Architecture Overview
graph TB
    subgraph "Client Layer"
        A[Web Browser] --> B[React Frontend]
    end
    
    subgraph "Load Balancer"
        B --> C[Nginx Ingress]
    end
    
    subgraph "Application Layer"
        C --> D[Flask Backend API]
    end
    
    subgraph "Data Layer"
        D --> E[PostgreSQL Database]
    end
    
    subgraph "DevOps Pipeline"
        F[Git Repository] --> G[Jenkins CI/CD]
        G --> H[Docker Registry]
        H --> I[ArgoCD GitOps]
        I --> J[Kubernetes Cluster]
    end
    
    subgraph "External APIs"
        D --> K[Prayer Times API]
        D --> L[Quran API]
        D --> M[Hadith API]
    end
Loading
โš™๏ธ Technology Stack

Frontend Technologies

Technology Version Purpose
React 18.2.0 Modern UI framework with hooks and concurrent features
TypeScript 4.9.5 Type-safe development with enhanced IDE support
Material-UI 5.13.0 Production-ready React components and design system
React Router 6.18.0 Declarative routing for single-page applications
Zustand 4.4.6 Lightweight state management without boilerplate
Axios 1.5.2 Promise-based HTTP client with interceptors

Backend Technologies

Technology Version Purpose
Flask 2.2+ Lightweight and flexible Python web framework
SQLAlchemy Latest Python SQL toolkit and Object-Relational Mapping
Flask-JWT-Extended Latest JWT token authentication for Flask applications
PostgreSQL 15 Advanced open-source relational database
Gunicorn Latest Python WSGI HTTP Server for production

DevOps & Infrastructure

Tool Purpose Environment
Docker Containerization platform All environments
Kubernetes Container orchestration at scale Production
Jenkins Continuous Integration/Continuous Deployment CI/CD Pipeline
ArgoCD GitOps continuous delivery Production
Nginx Reverse proxy and load balancer Production
Trivy Vulnerability scanner for containers Security
๐Ÿ› ๏ธ Development & Deployment Tools

Version Control & Repository Management

Tool Purpose Configuration
Git/GitHub Source code version control and collaboration - Repository hosting
- Webhook integration for CI/CD
- Access tokens for Jenkins integration

Containerization & Orchestration

Tool Purpose Configuration
Docker Application containerization - Multi-stage builds for optimization
- Container image management
Docker Compose Local development environment - Multi-service orchestration
- Volume management for development
Kubernetes (kubeadm) Production container orchestration - 3-node cluster setup
- Auto-scaling and self-healing
- Persistent storage management

CI/CD Pipeline

Tool Purpose Configuration
Jenkins Continuous Integration/Deployment - Containerized deployment for easy management
- Multibranch pipeline for branch-based builds
- Ignore Git Committer strategy to prevent infinite webhook loops
- Discord integration for real-time build notifications
- GitHub access token integration for secure API access
Ngrok Local development webhook tunneling - Development tunnel for GitHub webhook forwarding
- Enables GitHub webhooks to reach local Jenkins instance
- Simplifies local development and testing of CI/CD workflows

GitOps & Deployment

Tool Purpose Configuration
ArgoCD GitOps continuous delivery - Deployed in Kubernetes cluster
- Automated application synchronization
- Staging and production environments

Infrastructure & Networking

Tool Purpose Configuration
Nginx Reverse proxy and load balancer - SSL termination
- Static file serving
- Request routing
Vagrant Development environment virtualization - 3-node Kubernetes cluster
- Consistent development environment
- kubeadm cluster setup

Development Environment

Tool Purpose Configuration
VS Code Primary development IDE - Extensions for React, Python, Docker, Kubernetes
- Integrated terminal and debugging
Bash Scripting Automation and deployment - Deployment scripts in k8s/ directory
- Database migration scripts
- Easy-to-use automation tools

Notification & Monitoring

Tool Purpose Configuration
Discord Build status notifications - Real-time pipeline status updates
- Success/failure notifications
- Team collaboration

Security & Authentication

Component Purpose Implementation
GitHub Access Tokens Jenkins-GitHub integration - Secure API access for Jenkins
- Webhook authentication
- Repository access management
Webhook Protection Infinite loop prevention - Git committer ignore rules
- Smart triggering logic

Key DevOps Practices Implemented

  • Infrastructure as Code: All configurations version-controlled
  • GitOps Workflow: ArgoCD manages deployments from Git
  • Containerized CI/CD: Jenkins running in containers
  • Multi-Environment Support: Staging and production pipelines
  • Automated Testing: Integrated into pipeline stages
  • Security Scanning: Vulnerability assessment with Trivy
  • Zero-Downtime Deployments: Rolling updates with Kubernetes
  • Monitoring & Alerting: Real-time notifications via Discord
๐Ÿ“ Project Structure
islamic-app/
โ”œโ”€โ”€ ๐Ÿ“ frontend/                     # React TypeScript Application
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/          # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ pages/               # Main application pages
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ contexts/            # React context providers
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ hooks/               # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ services/            # API service layer
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ stores/              # Zustand state management
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ utils/               # Utility functions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ BUILD.md                 # Frontend build documentation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Dockerfile               # Frontend container definition
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ package.json             # Dependencies and scripts
โ”œโ”€โ”€ ๐Ÿ“ backend/                      # Flask Python API
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ models/                  # SQLAlchemy database models
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ routes/                  # API endpoint handlers
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ schemas/                 # Data validation schemas
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ utils/                   # Backend utility functions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ BUILD.md                 # Backend build documentation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ app.py                   # Flask application entry point
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Dockerfile               # Backend container definition
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ requirements.txt         # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“ database/                     # Database Management
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ DATABASE.md              # Database documentation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ init.sql                 # Initial schema creation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ migrate.sh               # Migration script
โ”‚   โ””โ”€โ”€ ๐Ÿ“ migrations/              # Version-controlled migrations
โ”œโ”€โ”€ ๐Ÿ“ k8s/                         # Kubernetes Manifests
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ k8s-documentation.md     # Kubernetes deployment guide
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SCRIPTS.md               # Deployment scripts documentation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ *.yaml                   # Kubernetes resource definitions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ build-images.sh          # Docker image build script
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ deploy.sh                # Complete deployment automation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ deploy-only.sh           # Deploy without building
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ setup.sh                 # Initial cluster setup
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ cleanup.sh               # Resource cleanup
โ”œโ”€โ”€ ๐Ÿ“ argocd/                      # GitOps Configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ argocd-documentation.md  # ArgoCD setup and usage
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ application.yaml         # Production application definition
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ application-staging.yaml # Staging application definition
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ project.yaml             # ArgoCD project configuration
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ deploy.sh                # ArgoCD deployment script
โ”œโ”€โ”€ ๐Ÿ“ nginx/                       # Load Balancer Configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ nginx-documentation.md   # Nginx configuration guide
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ nginx.conf               # Nginx server configuration
โ”œโ”€โ”€ ๐Ÿ“„ docker-compose.yml           # Development environment
โ”œโ”€โ”€ ๐Ÿ“„ docker-compose.md            # Docker Compose documentation
โ”œโ”€โ”€ ๐Ÿ“„ Jenkinsfile                  # CI/CD Pipeline definition
โ”œโ”€โ”€ ๐Ÿ“„ Jenkinsfile.md               # Jenkins pipeline documentation
โ”œโ”€โ”€ ๐Ÿ“„ DEVOPS_GUIDE.md              # Master DevOps documentation
โ”œโ”€โ”€ ๐Ÿ“„ FILE_INDEX.md                # Complete file reference
โ””โ”€โ”€ ๐Ÿ“„ README.md                    # This file

Quick Start

Prerequisites

  • Node.js 16+
  • Python 3.8+
  • PostgreSQL 12+
  • Docker 20+
  • Docker Compose 2.0+

Development Setup

One-command setup:

git clone <repository-url>
cd Full-DevOps-Project-islamic-app
docker-compose up -d

Access points:

Manual setup:

# Frontend
cd frontend && npm install && npm start

# Backend
cd backend && python -m venv venv && source venv/bin/activate
pip install -r requirements.txt && python app.py

# Database
docker run -d --name islamic-db \
  -e POSTGRES_DB=islamic_app \
  -e POSTGRES_USER=islamic_user \
  -e POSTGRES_PASSWORD=islamic_pass123 \
  -p 5432:5432 postgres:15-alpine
Deployment

Docker Compose (Development)

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Clean rebuild
docker-compose down -v && docker-compose up --build -d

Kubernetes (Production)

# Quick deployment
cd k8s && ./setup.sh && ./deploy.sh

# Manual deployment
kubectl apply -f k8s/

# Verify deployment
kubectl get pods -n islamic-app

GitOps with ArgoCD

# Deploy ArgoCD applications
cd argocd && ./deploy.sh

# Access ArgoCD UI
kubectl port-forward svc/argocd-server -n argocd 8080:443
CI/CD Pipeline

Jenkins Pipeline Features

The Jenkins pipeline (Jenkinsfile) provides enterprise-grade CI/CD automation:

Pipeline Stages:

  1. Checkout & Change Detection: Smart detection of frontend/backend changes
  2. Build: Multi-architecture Docker image builds
  3. Security Scan: Trivy vulnerability assessment
  4. Push: Registry upload with semantic versioning
  5. Deploy: Automated Kubernetes deployment
  6. Notify: Discord webhook notifications

Key Features:

  • Smart Building: Only builds changed components
  • Security First: Mandatory vulnerability scanning
  • Multi-Environment: Separate pipelines for staging/production
  • Rollback Support: Automated rollback on failure
  • Resource Optimization: Parallel builds and caching
# Manual pipeline trigger
# Webhook URL: https://jenkins.yourdomain.com/github-webhook/

# Build specific components
curl -X POST "https://jenkins.yourdomain.com/job/islamic-app/buildWithParameters" \
  -d "BUILD_TYPE=frontend-only"

Pipeline Monitoring

Build Status Dashboard:

  • Build success/failure rates
  • Build duration trends
  • Security scan results
  • Deployment status across environments
API Documentation

Authentication

Method Endpoint Description
POST /api/auth/register User registration
POST /api/auth/login User authentication
GET /api/auth/profile Get user profile
PUT /api/auth/profile Update profile

Islamic Content

Method Endpoint Description
GET /api/quran/surah/{id} Get specific Surah
GET /api/quran/search Search Quran text
GET /api/hadith/collections Get hadith collections
GET /api/prayer-times Get prayer times
GET /api/tasbeh/phrases Get tasbeh counts
POST /api/tasbeh/increment Increment phrase count

Health Monitoring

Method Endpoint Description
GET /health Application health check
GET /api/health/detailed Detailed health status
GET /metrics Prometheus metrics
Security & Performance

Security Features

  • JWT-based authentication with refresh tokens
  • bcrypt password hashing
  • CORS configuration and input validation
  • Container vulnerability scanning with Trivy
  • TLS encryption and RBAC in Kubernetes
  • Secrets management and network policies

Performance Optimization

  • Frontend: Code splitting, lazy loading, service workers
  • Backend: Connection pooling, query optimization, caching
  • Infrastructure: Auto-scaling, resource optimization, CDN integration

Monitoring

  • Application health checks and performance metrics
  • Kubernetes and container monitoring
  • Error tracking and alerting
  • Discord/Slack notifications for incidents
Testing & Quality Assurance

Testing Strategy

# Frontend tests
npm test                    # Unit tests with Jest
npm run test:integration    # Integration tests
npm run test:e2e           # End-to-end tests with Cypress

# Backend tests
pytest tests/unit/         # Unit tests
pytest tests/integration/  # Integration tests
pytest tests/api/          # API tests

Code Quality

  • TypeScript strict mode with ESLint + Prettier
  • Python PEP 8 compliance with type hints
  • Automated security scanning in CI/CD
  • Comprehensive test coverage (>80%)

๐Ÿ“ธ Screenshots & Documentation

๐Ÿ•Œ Application Features

Main Application Interface

Home Page Main dashboard with Islamic resources and navigation

Authentication System

Login Interface Registration Interface
Login Signup

Islamic Features

Prayer Times Digital Tasbeh
Prayer Times Tasbeh
Quran Audio Quran Reader
Quran Audio Quran Reader
Hadith Collection Azkar & Duas
Hadith Azkar
๐Ÿš€ DevOps Pipeline & Infrastructure

Jenkins CI/CD Pipeline

Pipeline Frontend & Backend Complete CI/CD pipeline with frontend and backend build stages

Pipeline with Security Scanning Advanced pipeline with security image scanning using Trivy

Build Notifications

Discord Notifications Real-time build status notifications via Discord integration

Kubernetes & GitOps

Kubernetes Resources All application resources deployed in Kubernetes cluster

ArgoCD Dashboard ArgoCD GitOps interface showing deployment status

Node Usage Kubernetes cluster resource monitoring

Development Environment

VS Code IDE Development environment with project structure

Ngrok Tunnel Ngrok tunnel for GitHub webhook forwarding

Contributing

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make changes and test locally
  4. Commit with clear messages: git commit -m "feat: add new feature"
  5. Push and create a pull request

Code Standards

  • Follow TypeScript/ESLint configuration for frontend
  • Follow PEP 8 standards for Python backend
  • Maintain test coverage above 80%
  • Update documentation for new features

Commit Message Format

type(scope): description

Examples:
feat(auth): add two-factor authentication
fix(api): resolve prayer times calculation error
docs(k8s): update deployment instructions
Support

Getting Help

  • Documentation: Comprehensive guides in this repository
  • Issues: Create GitHub issues for bugs or feature requests
  • Discussions: Use GitHub Discussions for questions
  • Email: Contact maintainer for security issues

Project Status

GitHub Issues GitHub Contributors GitHub Last Commit

Quick Reference

Essential Commands

# Development
docker-compose up -d              # Start development environment
npm start                         # Frontend development server
python app.py                     # Backend development server

# Building
npm run build                     # Build frontend for production
./k8s/build-images.sh            # Build all images for Kubernetes

# Deployment
./k8s/deploy.sh                  # Deploy to Kubernetes
./argocd/deploy.sh               # Setup GitOps deployment

# Maintenance
kubectl get all pods -n islamic-app -o wide   # Check Kubernetes status
docker-compose logs -f            # View application logs
./k8s/cleanup.sh                 # Clean up resources

Built for the Muslim community with modern technology and enterprise DevOps practices.

About

A production-ready Islamic application demonstrating enterprise-level DevOps practices with full CI/CD automation, containerization, and GitOps deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors