Skip to content

KevinFairbanks/freedompress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

FreedomPress - Secure, Modular Content Management Framework

Build secure, fast, and scalable websites with enterprise-grade architecture

FreedomPress is a modern, security-first content management framework built on Next.js. It provides a modular architecture that allows you to build everything from simple blogs to complex ecommerce sites with enterprise-level security and performance.

πŸš€ Quick Start

npx create-freedompress-app my-website
cd my-website
npm run dev

Visit http://localhost:3000 to see your new FreedomPress site!

✨ Key Features

πŸ”’ Security First

  • Enterprise-grade authentication with NextAuth.js
  • Role-based access control (RBAC)
  • Comprehensive audit logging
  • Input sanitization and validation
  • Rate limiting and DDoS protection
  • Security headers and CSRF protection

🧩 Modular Architecture

  • Plugin-based module system
  • Hot-swappable components
  • Event-driven architecture
  • Dependency management
  • Configuration management

⚑ Performance Optimized

  • Built on Next.js for optimal performance
  • Static generation and incremental regeneration
  • Image optimization and lazy loading
  • Bundle size optimization
  • Database query optimization

πŸ› οΈ Developer Experience

  • TypeScript-first development
  • Comprehensive CLI tools
  • Hot reload and fast refresh
  • Built-in testing framework
  • Rich component library

πŸ“¦ Available Modules

Core Framework

The foundation of every FreedomPress site:

  • Authentication System: Secure user management with OAuth support
  • Module Registry: Dynamic module loading and management
  • API Layer: Secure, validated API endpoints
  • Base Components: Layout, SEO, Navigation, Error handling
  • CLI Tools: Project and module management commands

Blog Module (@freedompress/blog)

Complete content management system:

  • Rich text editor with markdown support
  • Category and tag management
  • SEO optimization
  • RSS feeds and sitemaps
  • Comment system
  • Social sharing

Shop Module (@freedompress/shop)

Full-featured ecommerce solution:

  • Product catalog with variants
  • Shopping cart and checkout
  • Stripe payment integration
  • Order management
  • Inventory tracking
  • Customer accounts

Starter Template (@freedompress/starter)

Ready-to-deploy boilerplate:

  • Pre-configured Next.js setup
  • Integrated blog and shop modules
  • Sample content and pages
  • Deployment configuration
  • Development tools

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    FreedomPress Core                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Auth System   β”‚  Module System  β”‚     API Layer           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Next.js Core   β”‚    Prisma DB    β”‚   Security Layer        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚             β”‚             β”‚
         β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”    β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
         β”‚  Blog  β”‚    β”‚  Shop  β”‚    β”‚ Custom β”‚
         β”‚ Module β”‚    β”‚ Module β”‚    β”‚ Module β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Installation Methods

1. Using the CLI (Recommended)

npx create-freedompress-app my-site
cd my-site
npm run dev

2. Manual Setup

git clone https://github.com/freedompress/starter my-site
cd my-site
npm install
npm run db:setup
npm run dev

3. Module-by-Module

npm install @freedompress/core
npm install @freedompress/blog
npm install @freedompress/shop

πŸ“š Documentation

For Users

For Developers

Module Documentation

πŸ› οΈ CLI Commands

# Project management
freedompress init my-project          # Create new project
freedompress dev                      # Start development server
freedompress build                    # Build for production

# Module management
freedompress module install blog      # Install blog module
freedompress module activate blog     # Activate blog module
freedompress module list              # List all modules

# Database operations
freedompress db migrate               # Run migrations
freedompress db seed                  # Seed database
freedompress db backup               # Create backup

🎨 Examples

Basic Blog Setup

import { FreedomPress } from '@freedompress/core'
import { BlogModule } from '@freedompress/blog'

const app = new FreedomPress({
  modules: [BlogModule],
  database: {
    url: process.env.DATABASE_URL
  },
  auth: {
    providers: ['google', 'github']
  }
})

export default app

Ecommerce Site

import { FreedomPress } from '@freedompress/core'
import { BlogModule } from '@freedompress/blog'
import { ShopModule } from '@freedompress/shop'

const app = new FreedomPress({
  modules: [BlogModule, ShopModule],
  shop: {
    stripe: {
      publishableKey: process.env.STRIPE_PUBLISHABLE_KEY,
      secretKey: process.env.STRIPE_SECRET_KEY
    }
  }
})

export default app

πŸ”§ Configuration

Environment Variables

# Database
DATABASE_URL="file:./dev.db"

# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"

# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_ID="your-github-id"
GITHUB_SECRET="your-github-secret"

# Stripe (for shop module)
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_SECRET_KEY="sk_test_..."

Module Configuration

{
  "modules": {
    "blog": {
      "enabled": true,
      "config": {
        "postsPerPage": 10,
        "enableComments": true,
        "seo": {
          "metaTitle": "My Blog",
          "metaDescription": "Welcome to my blog"
        }
      }
    },
    "shop": {
      "enabled": true,
      "config": {
        "currency": "USD",
        "shipping": {
          "freeShippingThreshold": 50
        }
      }
    }
  }
}

πŸš€ Deployment

Vercel (Recommended)

npm install -g vercel
vercel

Docker

docker build -t my-freedompress-site .
docker run -p 3000:3000 my-freedompress-site

Traditional Hosting

npm run build
npm start

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

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

πŸ“„ License

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

πŸ†˜ Support

πŸ™ Acknowledgments


FreedomPress - Empowering developers to build secure, scalable web applications with confidence.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors