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