A comprehensive e-commerce platform dedicated to bridging the digital divide through technology education and community empowerment. Built with modern web technologies and designed to support STEM education initiatives.
Digital Revolution is a foundation committed to creating pathways from digital exclusion to STEM opportunities. We believe technology should serve democratic values and create opportunities for all communities. Our platform sells products where 50% of profits go directly to digital equity and STEM education initiatives, ensuring every purchase contributes to closing the digital divide.
- Digital Literacy: Empowering communities with essential technology skills
- STEM Education: Creating opportunities in Science, Technology, Engineering, and Mathematics
- Community Building: Fostering inclusive technology ecosystems
- Democratic Values: Ensuring technology serves the public good
- Node.js 18+
- npm, yarn, pnpm, or bun
- MySQL database
- Stripe account for payments
- Printful account for product fulfillment
- Resend account for email services
- Clone the repository
git clone https://github.com/yourusername/digital-revolution.git
cd digital-revolution- Install dependencies
npm install
# or
yarn install
# or
pnpm install- Set up environment variables
cp .env.example .env.local- Configure your environment variables
# Database
DATABASE_URL="mysql://username:password@localhost:3306/digital_revolution"
# NextAuth
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
# Printful
DIGITAL_REVOLUTION_API_KEY="your-printful-api-key"
# Resend
RESEND_API_KEY="re_..."
# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Set up the database
npx prisma generate
npx prisma db push- Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 to see the application.
digital-revolution/
βββ src/
β βββ app/ # Next.js App Router
β β βββ (pages)/ # Main pages
β β β βββ about/ # About page
β β β βββ shop/ # Shop pages
β β β β βββ product/ # Product detail pages
β β β β βββ cart/ # Shopping cart
β β β βββ donate/ # Donation pages
β β β βββ partners/ # Partnership pages
β β β βββ profile/ # User profile
β β β βββ orders/ # Order history
β β β βββ share/ # Social sharing
β β β βββ api/ # API routes
β β β βββ webhooks/ # Webhook handlers
β β β β βββ stripe/ # Stripe webhooks
β β β β βββ printful/ # Printful webhooks
β β β βββ auth/ # Authentication
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β βββ components/ # React components
β β βββ ui/ # Reusable UI components
β β βββ forms/ # Form components
β β βββ pages/ # Page-specific components
β β βββ layout/ # Layout components
β βββ contexts/ # React contexts
β β βββ ShopContext.tsx # Shopping context
β β βββ ProductContext.tsx # Product context
β βββ lib/ # Utility libraries
β β βββ actions.ts # Server actions
β β βββ prisma.ts # Database client
β β βββ stripe.ts # Stripe client
β β βββ resend.ts # Email client
β β βββ utils.ts # Utility functions
β β βββ rateLimiter.ts # Rate limiting
β βββ emails/ # Email templates
β β βββ OrderEmails.ts # Order notifications
β β βββ DonationEmails.ts # Donation emails
β β βββ PartnersTicketEmail.tsx # Partnership emails
β βββ constants/ # Static data
β β βββ index.tsx # All constants
β βββ hooks/ # Custom React hooks
β βββ useClickOutside.ts # Click outside detection
βββ prisma/ # Database schema
β βββ schema.prisma # Prisma schema
β βββ generated/ # Generated Prisma client
βββ public/ # Static assets
β βββ Assets/ # Images and logos
β βββ videos/ # Video files
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ next.config.js # Next.js configuration
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Icon library
- GSAP - Animation library with SplitText
- React Email - Email template system
- Next.js API Routes - Server-side API
- Prisma - Database ORM
- MySQL - Database
- NextAuth.js v5 - Authentication
- Server Actions - Form handling
- Stripe - Payment processing
- Printful - Product fulfillment
- Resend - Email delivery
- Google OAuth - Authentication
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Type checking
- Prisma Studio - Database management
- Product Catalog - Dynamic product listings with filtering
- Shopping Cart - Persistent cart with guest/user support
- Checkout Process - Secure Stripe integration
- Order Management - Order tracking and history
- Inventory Management - Real-time stock checking
- Responsive Design - Mobile-first approach
- Dark Theme - Modern aesthetic with gradients
- Animations - GSAP-powered smooth transitions
- Accessibility - WCAG compliant design
- Performance - Optimized loading and caching
- Dynamic Content - Data-driven page generation
- Image Carousels - Interactive product galleries
- Form Handling - Contact and partnership forms
- Email Templates - Professional email communications
- Donation System - One-time and recurring donations
- Partnership Program - Organization collaboration
- Social Sharing - Community engagement tools
- Analytics - User behavior tracking
The application uses Prisma with MySQL. Key models include:
- User - User accounts and authentication
- Product - Product catalog and variants
- Cart/CartItem - Shopping cart functionality
- Order/OrderItem - Order management
- Donation - Donation tracking
- Subscription - Recurring donations
- PartnerTicket - Partnership inquiries
All sensitive configuration is managed through environment variables. See .env.example for required variables.
Built-in rate limiting prevents API abuse and ensures fair usage across all endpoints.
- Order Confirmation - Purchase confirmations
- Shipping Notifications - Order tracking updates
- Donation Receipts - Tax-deductible receipts
- Partnership Responses - Collaboration confirmations
- Resend Integration - Reliable email delivery
- Template Management - React-based email templates
- Responsive Design - Mobile-friendly emails
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Railway - Full-stack deployment
- DigitalOcean - VPS deployment
- AWS - Enterprise deployment
Before committing your changes, run the following checks to ensure code quality:
# Run all checks (lint, format check, type check)
npm run check
# Or run individually:
npm run lint # Check for linting errors
npm run format:check # Check code formatting
npm run type-check # Check TypeScript typesnpm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix auto-fixable ESLint issuesnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm run type-check- Run TypeScript type checkingnpm run check- Run all checks (lint + format + type-check)
GitHub Actions automatically runs quality checks on every push and pull request:
- ESLint - Checks for code quality and best practices
- Prettier - Verifies code formatting consistency
- TypeScript - Validates type safety
The CI pipeline runs on:
- Push to
mainordevelopbranches - Pull requests targeting
mainordevelopbranches
Note: You don't need to manually configure GitHub Actions - the workflow file (.github/workflows/ci.yml) is already set up and will run automatically when you push to GitHub.
If CI fails, fix the issues locally:
# Fix linting issues
npm run lint:fix
# Fix formatting issues
npm run format
# Check types (fix any TypeScript errors in your code)
npm run type-checkWe welcome contributions to Digital Revolution! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run quality checks before committing:
npm run check
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a pull request
Important: All pull requests must pass the CI checks (linting, formatting, and type checking) before they can be merged.
This project is licensed under the MIT License - see the LICENSE file for details.
- Printful - Product fulfillment services
- Stripe - Payment processing
- Vercel - Hosting and deployment
- Next.js Team - Amazing React framework
- Tailwind CSS - Beautiful utility-first CSS
- Email: clutchdev.apps@gmail.com
- Website: Digital Revolution
- Mission: Bridging the digital divide through technology education
Made with β€οΈ for digital equity