Skip to content

New Andalus is an open-source editorial platform that combines the power of modern web technologies with enterprise-grade security, performance, and scalability. Built with Next.js 15, it provides a seamless content creation and publishing experience for individuals, teams, and organizations.

License

Notifications You must be signed in to change notification settings

dream1290/new-andalus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

New Andalus Editorial Platform

License: MIT Node.js Version Next.js TypeScript Docker Kubernetes CI/CD

A modern, enterprise-grade editorial platform built for the next generation of content creators and publishers.

New Andalus is an open-source editorial platform that combines the power of modern web technologies with enterprise-grade security, performance, and scalability. Built with Next.js 15, React 19, and TypeScript, it provides a seamless content creation and publishing experience for individuals, teams, and organizations.

✨ Features

πŸš€ Modern Technology Stack

  • Next.js 15 with App Router and React Server Components
  • React 19 for cutting-edge UI development
  • TypeScript 5.3+ for type safety and developer experience
  • Tailwind CSS for responsive, utility-first styling
  • Radix UI for accessible component primitives
  • Drizzle ORM with PostgreSQL for type-safe database operations

πŸ“ Rich Content Creation

  • Advanced rich text editor powered by TipTap
  • Real-time collaborative editing capabilities
  • Image upload and automatic optimization
  • SEO-friendly content management
  • Auto-save and comprehensive version control
  • Markdown support with live preview

πŸ” Enterprise Security

  • Comprehensive input validation and sanitization
  • CSRF protection and intelligent rate limiting
  • Security headers and Content Security Policy
  • Real-time security monitoring and alerting
  • OWASP Top 10 compliance
  • Multi-factor authentication support

πŸ“Š Performance & Monitoring

  • Core Web Vitals optimization (LCP < 2.5s)
  • Redis caching with intelligent invalidation
  • Database query optimization and monitoring
  • Real-time performance tracking
  • Prometheus metrics integration
  • Comprehensive error tracking

🌐 Production Ready

  • Docker containerization with multi-stage builds
  • Kubernetes deployment manifests
  • CI/CD pipeline with GitHub Actions
  • Multi-environment support (dev, staging, production)
  • Comprehensive testing suite (unit, integration, e2e)
  • Infrastructure as Code with Terraform

🎨 Developer Experience

  • Hot reload development environment
  • Comprehensive TypeScript types
  • ESLint and Prettier configuration
  • Automated testing with Vitest and Playwright
  • Detailed documentation and examples
  • Docker Compose for local development

πŸš€ Quick Start

Option 1: Docker (Recommended for Quick Setup)

# Clone the repository
git clone https://github.com/Oualidl290/new-andalus.git
cd new-andalus

# Run the setup script
./setup.sh
# or on Windows: setup.bat

# The application will be available at http://localhost:3000

Option 2: Local Development

Prerequisites

  • Node.js 20+ or Bun 1.0+
  • PostgreSQL 16+
  • Redis 7+
  • Docker (optional, for database services)

Setup Steps

  1. Clone the repository:

    git clone https://github.com/Oualidl290/new-andalus.git
    cd new-andalus
  2. Install dependencies:

    npm install
    # or
    bun install
  3. Start database services:

    # Using Docker Compose (recommended)
    npm run db:up
    # Or use your local PostgreSQL and Redis instances
  4. Set up environment variables:

    cp .env.example .env.local
    # Edit .env.local with your configuration
  5. Initialize the database:

    npm run db:push
    npm run db:seed
  6. Start the development server:

    npm run dev
  7. Open your browser: Navigate to http://localhost:3000

πŸ“‹ Available Scripts

Development

npm run dev          # Start development server with Turbopack
npm run build        # Build for production
npm run start        # Start production server
npm run type-check   # Run TypeScript type checking

Code Quality

npm run lint         # Run Biome linting
npm run lint:fix     # Fix linting issues automatically
npm run format       # Format code with Biome
npm run format:check # Check code formatting

Database

npm run db:up        # Start PostgreSQL and Redis containers
npm run db:down      # Stop database containers
npm run db:reset     # Reset database (destroy and recreate)
npm run db:generate  # Generate Drizzle migrations
npm run db:push      # Push schema changes to database
npm run db:migrate   # Run database migrations
npm run db:studio    # Open Drizzle Studio (database GUI)
npm run db:seed      # Seed database with sample data

Testing

npm run test         # Run tests in watch mode
npm run test:run     # Run tests once
npm run test:ui      # Run tests with UI
npm run test:coverage # Generate test coverage report

Docker

npm run docker:build # Build production Docker image
npm run docker:run   # Run production container

🐳 Docker Development

Quick Start with Docker

# Clone and start
git clone https://github.com/Oualidl290/new-andalus.git
cd new-andalus
./setup.sh  # or setup.bat on Windows

# The application will be available at http://localhost:3000

Docker Services

When running docker-compose up -d, the following services are available:

  • Web Application: http://localhost:3000
  • PostgreSQL: localhost:5432
  • Redis: localhost:6379
  • Adminer (Database UI): http://localhost:8080
  • RedisInsight (Redis UI): http://localhost:8001
  • MailHog (Email Testing): http://localhost:8025
  • MinIO (Object Storage): http://localhost:9001
  • Grafana (Monitoring): http://localhost:3001
  • Kibana (Search UI): http://localhost:5601

Production Docker Build

# Build production image
docker build -t new-andalus:latest .

# Run production container
docker run -p 3000:3000 \
  -e DATABASE_URL="postgresql://..." \
  -e REDIS_URL="redis://..." \
  new-andalus:latest

cd platform

Start with Docker Compose

docker-compose up -d

The application will be available at http://localhost:3000


### Option 2: Local Development

#### Prerequisites

- **Node.js 20+** or **Bun 1.0+**
- **PostgreSQL 16+**
- **Redis 7+**
- **Docker** (optional, for database services)

#### Setup Steps

1. **Clone the repository:**
   ```bash
   git clone https://github.com/new-andalus/platform.git
   cd platform
  1. Install dependencies:

    npm install
    # or
    bun install
  2. Start database services:

    # Using Docker Compose (recommended)
    npm run db:up
    
    # Or use your local PostgreSQL and Redis instances
  3. Set up environment variables:

    cp .env.example .env.local
    # Edit .env.local with your configuration
  4. Initialize the database:

    npm run db:push
    npm run db:seed
  5. Start the development server:

    npm run dev
  6. Open your browser: Navigate to http://localhost:3000

πŸ“‹ Available Scripts

Development

npm run dev          # Start development server with Turbopack
npm run build        # Build for production
npm run start        # Start production server
npm run type-check   # Run TypeScript type checking

Code Quality

npm run lint         # Run ESLint
npm run lint:fix     # Fix linting issues automatically
npm run format       # Format code with Prettier
npm run format:check # Check code formatting

Database

npm run db:up        # Start PostgreSQL and Redis containers
npm run db:down      # Stop database containers
npm run db:reset     # Reset database (destroy and recreate)
npm run db:generate  # Generate Drizzle migrations
npm run db:push      # Push schema changes to database
npm run db:migrate   # Run database migrations
npm run db:studio    # Open Drizzle Studio (database GUI)
npm run db:seed      # Seed database with sample data

Testing

npm run test         # Run tests in watch mode
npm run test:run     # Run tests once
npm run test:ui      # Run tests with UI
npm run test:e2e     # Run end-to-end tests
npm run test:coverage # Generate test coverage report

Security

npm run security:audit    # Run security audit
npm run security:scan     # Comprehensive security scan
npm audit                 # Check for vulnerabilities

πŸ“ Project Structure

new-andalus/
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ πŸ“ app/                    # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ πŸ“ (auth)/            # Authentication pages
β”‚   β”‚   β”œβ”€β”€ πŸ“ admin/             # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ πŸ“ api/               # API routes
β”‚   β”‚   └── πŸ“ articles/          # Article pages
β”‚   β”œβ”€β”€ πŸ“ components/            # React components
β”‚   β”‚   β”œβ”€β”€ πŸ“ admin/             # Admin-specific components
β”‚   β”‚   β”œβ”€β”€ πŸ“ auth/              # Authentication components
β”‚   β”‚   β”œβ”€β”€ πŸ“ editor/            # Rich text editor components
β”‚   β”‚   └── πŸ“ ui/                # Reusable UI components
β”‚   β”œβ”€β”€ πŸ“ lib/                   # Utility functions and configurations
β”‚   β”‚   β”œβ”€β”€ πŸ“ auth/              # Authentication logic
β”‚   β”‚   β”œβ”€β”€ πŸ“ cache/             # Caching utilities
β”‚   β”‚   β”œβ”€β”€ πŸ“ db/                # Database configuration
β”‚   β”‚   β”œβ”€β”€ πŸ“ security/          # Security utilities
β”‚   β”‚   └── πŸ“ validation/        # Input validation schemas
β”‚   β”œβ”€β”€ πŸ“ hooks/                 # Custom React hooks
β”‚   β”œβ”€β”€ πŸ“ types/                 # TypeScript type definitions
β”‚   └── πŸ“ test/                  # Test utilities and fixtures
β”œβ”€β”€ πŸ“ .github/                   # GitHub Actions workflows
β”œβ”€β”€ πŸ“ kubernetes/                # Kubernetes deployment manifests
β”œβ”€β”€ πŸ“ terraform/                 # Infrastructure as Code
β”œβ”€β”€ πŸ“ scripts/                   # Utility scripts
β”œβ”€β”€ πŸ“„ docker-compose.yml         # Local development environment
β”œβ”€β”€ πŸ“„ Dockerfile                 # Production container image
└── πŸ“„ README.md                  # This file

🎯 Core Features

βœ… Implemented Features

  • πŸ—οΈ Modern Architecture: Next.js 15 with App Router and React Server Components
  • 🎨 Rich UI: Tailwind CSS with Radix UI components for accessibility
  • πŸ” Authentication: NextAuth.js with multiple providers and JWT tokens
  • πŸ“ Content Management: Rich text editor with TipTap and collaborative editing
  • πŸ—„οΈ Database: PostgreSQL with Drizzle ORM for type-safe operations
  • ⚑ Caching: Redis integration with intelligent cache invalidation
  • πŸ”’ Security: Comprehensive security measures and OWASP compliance
  • πŸ“Š Monitoring: Performance tracking and error monitoring
  • πŸ§ͺ Testing: Unit, integration, and end-to-end testing suites
  • πŸš€ Deployment: Docker, Kubernetes, and CI/CD ready

πŸ”„ In Development

  • 🀝 Real-time Collaboration: Live collaborative editing with WebSockets
  • πŸ” Advanced Search: Full-text search with Elasticsearch integration
  • πŸ“± Mobile App: React Native mobile application
  • 🌐 Internationalization: Multi-language support
  • πŸ“ˆ Analytics: Advanced content analytics and insights
  • 🎨 Theming: Customizable themes and white-label solutions

🐳 Docker Development

Quick Start with Docker

# Clone and start
git clone https://github.com/new-andalus/platform.git
cd platform
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Docker Services

  • Web Application: http://localhost:3000
  • PostgreSQL: localhost:5432
  • Redis: localhost:6379
  • Adminer (Database UI): http://localhost:8080

Production Docker Build

# Build production image
docker build -t new-andalus:latest .

# Run production container
docker run -p 3000:3000 \
  -e DATABASE_URL="postgresql://..." \
  -e REDIS_URL="redis://..." \
  new-andalus:latest

☸️ Kubernetes Deployment

Local Development with Minikube

# Start Minikube
minikube start

# Apply Kubernetes manifests
kubectl apply -f kubernetes/

# Port forward to access the application
kubectl port-forward svc/web-frontend-service 3000:80

Production Deployment

# Deploy to production cluster
kubectl apply -f kubernetes/namespaces/
kubectl apply -f kubernetes/secrets/
kubectl apply -f kubernetes/deployments/
kubectl apply -f kubernetes/services/
kubectl apply -f kubernetes/ingress/

πŸ§ͺ Testing

Running Tests

# Unit tests
npm run test

# Integration tests
npm run test:integration

# End-to-end tests
npm run test:e2e

# All tests with coverage
npm run test:coverage

Test Structure

  • Unit Tests: Component and utility function tests
  • Integration Tests: API endpoint and database integration tests
  • End-to-End Tests: Full user journey tests with Playwright
  • Security Tests: Security vulnerability and penetration tests

πŸ” Security

New Andalus implements enterprise-grade security measures:

  • Input Validation: Comprehensive validation with Zod schemas
  • Output Sanitization: XSS prevention with DOMPurify
  • CSRF Protection: Token-based CSRF protection
  • Rate Limiting: Intelligent rate limiting to prevent abuse
  • Security Headers: Comprehensive security headers including CSP
  • Authentication: Secure authentication with NextAuth.js
  • Authorization: Role-based access control (RBAC)
  • Monitoring: Real-time security event monitoring

Security Audit

# Run comprehensive security audit
npm run security:audit

# Check for known vulnerabilities
npm audit

# Run custom security tests
npm run test:security

πŸ“Š Performance

Performance Targets

  • Lighthouse Score: 90+ across all metrics
  • Core Web Vitals:
    • LCP < 2.5s
    • FID < 100ms
    • CLS < 0.1
  • Time to Interactive: < 3s on 3G networks
  • Bundle Size: < 250KB gzipped

Performance Monitoring

# Run performance tests
npm run test:performance

# Analyze bundle size
npm run analyze

# Lighthouse audit
npm run audit:lighthouse

🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run the test suite: npm run test
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • TypeScript: Strict mode enabled
  • ESLint: Airbnb configuration with custom rules
  • Prettier: Automatic code formatting
  • Conventional Commits: Standardized commit messages

πŸ“„ License

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

πŸ™ Acknowledgments

  • Next.js Team for the amazing framework
  • Vercel for hosting and deployment platform
  • Radix UI for accessible component primitives
  • Tailwind CSS for the utility-first CSS framework
  • Drizzle Team for the excellent ORM
  • Open Source Community for inspiration and contributions

πŸ“ž Support

πŸ—ΊοΈ Roadmap

2025 Q4

  • Real-time collaborative editing
  • Advanced search with Elasticsearch
  • Mobile application (React Native)
  • Plugin system architecture
  • Multi-tenant support
  • Advanced analytics dashboard
  • Internationalization (i18n)
  • White-label solutions
  • AI-powered content suggestions
  • Advanced workflow management
  • Enterprise SSO integration
  • Advanced caching strategies
  • Microservices architecture
  • GraphQL API
  • Advanced monitoring and observability
  • Performance optimizations

About

New Andalus is an open-source editorial platform that combines the power of modern web technologies with enterprise-grade security, performance, and scalability. Built with Next.js 15, it provides a seamless content creation and publishing experience for individuals, teams, and organizations.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published