Skip to content

Latest commit

Β 

History

History
313 lines (247 loc) Β· 7.72 KB

File metadata and controls

313 lines (247 loc) Β· 7.72 KB

πŸš€ DevOps Academy

A modern, multilingual learning platform for mastering DevOps practices, CI/CD, Cloud Computing, and Infrastructure as Code.

License: MIT Node.js React TypeScript

πŸ“‹ Table of Contents

🎯 Overview

DevOps Academy is a comprehensive e-learning platform designed to help developers and IT professionals master modern DevOps practices. The platform offers:

  • πŸ“š Structured courses on CI/CD, Docker, Kubernetes, and more
  • πŸŽ₯ Video-based learning with secure streaming
  • 🌍 Multi-language support (English, French, Arabic)
  • πŸ‘₯ User management and course enrollment
  • πŸ“ Blog/articles for industry insights
  • πŸ“± Responsive, mobile-friendly design

✨ Features

Core Features

  • User Authentication & Authorization - Secure JWT-based authentication
  • Course Management - Browse, enroll, and track progress
  • Video Streaming - Secure video content delivery
  • Blog System - DevOps articles and best practices
  • Admin Dashboard - Content and user management
  • Multilingual Support - i18n with English, French, and Arabic
  • Responsive Design - Mobile-first approach with Tailwind CSS

DevOps Features

  • πŸ”„ CI/CD pipeline examples
  • 🐳 Docker containerization tutorials
  • ☸️ Kubernetes orchestration courses
  • ☁️ Cloud platform integration (AWS, Azure)
  • πŸ—οΈ Infrastructure as Code (Terraform, Ansible)
  • πŸ“Š Monitoring and logging best practices

πŸ› οΈ Tech Stack

Frontend

  • React 18.3 - Modern UI library
  • TypeScript - Type-safe development
  • React Router - Client-side routing
  • i18next - Internationalization
  • Tailwind CSS - Utility-first styling
  • Axios - HTTP client

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • TypeScript - Type-safe backend
  • MySQL - Relational database
  • JWT - Authentication tokens
  • Multer & Sharp - File upload and image processing
  • Helmet & CORS - Security middleware

πŸ“¦ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js >= 18.x
  • npm >= 9.x or yarn >= 1.22
  • MySQL >= 5.7 or MySQL 8.x
  • Git (for version control)

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/yourusername/devops-academy.git
cd devops-academy

2. Install Dependencies

Backend

cd backend
npm install

Frontend

cd frontend
npm install

βš™οΈ Configuration

Backend Configuration

Create a .env file in the backend directory:

# Server Configuration
PORT=5001
NODE_ENV=development

# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=devops_academy

# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_change_in_production
JWT_EXPIRES_IN=7d

# CORS Configuration
CORS_ORIGIN=http://localhost:3000

# File Upload Configuration
MAX_FILE_SIZE=100MB
UPLOAD_PATH=./uploads

Frontend Configuration

Create a .env file in the frontend directory:

REACT_APP_API_URL=http://localhost:5001

Database Setup

  1. Create the database:
CREATE DATABASE devops_academy CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  1. Run migrations (if available):
cd backend
npm run migrate

πŸƒ Running the Application

Development Mode

Start Backend

cd backend
npm run dev

Backend will run on http://localhost:5001

Start Frontend

cd frontend
npm start

Frontend will run on http://localhost:3000

Production Build

Build Backend

cd backend
npm run build
npm start

Build Frontend

cd frontend
npm run build:prod

πŸ“ Project Structure

devops-academy/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/          # Configuration files
β”‚   β”‚   β”œβ”€β”€ middleware/      # Express middleware
β”‚   β”‚   β”œβ”€β”€ routes/          # API routes
β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   β”œβ”€β”€ types/           # TypeScript types
β”‚   β”‚   β”œβ”€β”€ app.ts           # Express app setup
β”‚   β”‚   └── server.ts        # Server entry point
β”‚   β”œβ”€β”€ uploads/             # User-uploaded files
β”‚   β”œβ”€β”€ migrations/          # Database migrations
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/              # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ lib/             # Utilities and services
β”‚   β”‚   β”œβ”€β”€ locales/         # i18n translations
β”‚   β”‚   β”œβ”€β”€ styles/          # CSS files
β”‚   β”‚   β”œβ”€β”€ App.tsx          # Root component
β”‚   β”‚   └── index.tsx        # Entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ .gitignore
└── README.md

πŸ”„ DevOps Practices

This project demonstrates several DevOps best practices:

1. Version Control

  • Git for source control
  • Branching strategy (main, develop, feature branches)
  • Semantic versioning

2. CI/CD Pipeline

# Example: .github/workflows/ci.yml
name: CI Pipeline
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: npm install
      - name: Run tests
        run: npm test
      - name: Build
        run: npm run build

3. Containerization

# Example Dockerfile for backend
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 5001
CMD ["npm", "start"]

4. Infrastructure as Code

  • Docker Compose for local development
  • Terraform scripts for cloud infrastructure (to be added)
  • Kubernetes manifests for container orchestration (to be added)

5. Monitoring & Logging

  • Structured logging with Morgan
  • Error tracking (to be implemented)
  • Performance monitoring (to be implemented)

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Follow the existing code style

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Team

πŸ™ Acknowledgments

  • React community for excellent documentation
  • Node.js ecosystem for powerful tools
  • DevOps community for best practices and inspiration

πŸ“§ Contact

For questions or support, please contact:


Built with ❀️ by the DevOps Academy Team