Thank You for Your Purchase! 🙏
We're thrilled that you've chosen Nomad Store for your digital products ecommerce platform. This comprehensive documentation will help you get started quickly and make the most of all the features we've built for you.
Introduction
Nomad Store is a modern, full-featured ecommerce platform built specifically for selling digital products. It's designed to handle software licenses, digital downloads, courses, templates, and other digital assets with ease.
Built with cutting-edge technologies, Nomad Store provides a complete solution for digital product sales, including payment processing, user management, order tracking, and much more.
⚡ Next.js 14
Built with the latest Next.js App Router for optimal performance
💚 Supabase
Full-stack backend with PostgreSQL, Authentication, and Storage
🎨 Modern UI
Beautiful interface with Tailwind CSS and shadcn/ui components
💳 Payments
Stripe and PayPal integration for secure transactions
📧 Email System
Automated email notifications and templates
🔐 Security
2FA, role-based access control, and secure authentication
Requirements
Before you begin, ensure you have the following installed on your system:
System Requirements
- Node.js >= 18.17.0
- pnpm 8 or higher
- Supabase Account (free tier works)
Optional but Recommended
- VS Code or your preferred code editor
pnpm as the package manager.
While you can use npm or yarn, pnpm is recommended for optimal performance and disk space efficiency.
Installation
Follow these steps to get Nomad Store up and running on your local machine:
Step 1: Extract the Project Files
You should have received a folder containing all the project files. Extract it to your desired location if it's compressed (ZIP, RAR, etc.).
# Navigate to the project folder
cd path/to/NOMADSTORE
Or simply open the folder in your terminal/command prompt.
Step 2: Install Dependencies
Install all required packages using pnpm:
pnpm install
npm install -g pnpm
Step 3: Set Up Environment Variables
Copy the example environment file and configure it:
cp .env.example .env.local
Then edit .env.local and add your Supabase credentials (see Configuration section below).
Step 4: Set Up Supabase
- Create a new project at database.new
- Get your project URL and API keys from Settings → API
- Add them to your
.env.localfile (see Configuration section below)
Step 5: Run the Development Server
pnpm dev
Open http://localhost:3000 in your browser.
Configuration
Configure your environment variables and application settings.
Environment Variables
Create a .env.local file in the root directory with the following variables:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
# Service Role Key (for admin operations only - NEVER expose to client)
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
Where to Find Supabase Credentials
- Go to your Supabase Dashboard
- Select your project
- Navigate to Settings → API
- Copy the following:
- Project URL →
NEXT_PUBLIC_SUPABASE_URL - anon public key →
NEXT_PUBLIC_SUPABASE_ANON_KEY - service_role key (secret) →
SUPABASE_SERVICE_ROLE_KEY
- Project URL →
.env.local file or expose the
SUPABASE_SERVICE_ROLE_KEY in client-side code. This key has full database access.
Optional Environment Variables
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SITE_URL |
Your site's public URL (for emails, OAuth callbacks) | Optional |
VERCEL_URL |
Automatically set by Vercel | Auto |
Configuring GitHub OAuth Login
To enable GitHub login/signup, you need to configure GitHub OAuth in Supabase. All settings are managed in the Supabase dashboard.
Step 1: Create a GitHub OAuth App
- Go to GitHub and navigate to Settings → Developer settings → OAuth Apps
- For personal accounts: https://github.com/settings/developers
- For organizations:
https://github.com/organizations/YOUR_ORG/settings/developers
- Click New OAuth App
- Fill in the application details:
- Application name:
Nomad Store(or your preferred name) - Homepage URL: Your site URL (e.g.,
https://your-domain.comorhttp://localhost:3000for local development) - Authorization callback URL:
- For production:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback - Replace
YOUR_PROJECT_REFwith your Supabase project reference ID (found in Supabase Dashboard → Settings → General)
- For production:
- Application name:
- Click Register application
- Copy the Client ID and generate a Client Secret:
- Click Generate a new client secret
- Save the Client Secret immediately (you won't be able to see it again)
Step 2: Configure GitHub Provider in Supabase
- Go to your Supabase Dashboard
- Select your project
- Navigate to Authentication → Providers in the left sidebar
- Find GitHub in the list of providers and click on it
- Enable GitHub provider by toggling the Enable GitHub provider switch
- Enter your GitHub OAuth credentials:
- Client ID (for OAuth App): Paste your GitHub Client ID
- Client Secret (for OAuth App): Paste your GitHub Client Secret
- Click Save
Step 3: Configure Redirect URLs in Supabase
- In Supabase Dashboard, go to Authentication → URL Configuration
- Add your site URLs to the Redirect URLs list:
- For local development:
http://localhost:3000/api/auth/callback - For production:
https://your-domain.com/api/auth/callback
- For local development:
- Set your Site URL:
- Development:
http://localhost:3000 - Production:
https://your-domain.com
- Development:
- Click Save
Step 4: Test GitHub Login
- Start your development server:
pnpm dev - Navigate to
http://localhost:3000/login - Click Sign in with GitHub or Sign up with GitHub
- You should be redirected to GitHub to authorize the application
- After authorization, you should be redirected back and logged in
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback (replace with your actual project reference ID).
Troubleshooting GitHub OAuth
Error: "redirect_uri_mismatch"
- Verify that your GitHub OAuth App callback URL is:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback - Check that your Supabase project reference ID is correct (found in Settings → General)
- Make sure there are no trailing slashes or typos
Error: "Invalid client credentials"
- Verify that you've copied the correct Client ID from GitHub
- Generate a new Client Secret in GitHub if needed
- Update the credentials in Supabase Authentication → Providers → GitHub
Available Commands
All commands use pnpm as the package manager.
Development Commands
| Command | Description |
|---|---|
pnpm dev |
Start development server at http://localhost:3000 |
pnpm build |
Create optimized production build |
pnpm start |
Start production server (run after build) |
pnpm lint |
Run ESLint to check code quality |
pnpm format |
Format code with Prettier |
pnpm format-check |
Check if code is properly formatted |
pnpm type-check |
Validate TypeScript types |
Testing Commands
| Command | Description |
|---|---|
pnpm test |
Run all Jest tests |
pnpm test:ci |
Run tests in CI mode |
pnpm test:apis |
Test all API endpoints |
pnpm test:apis:local |
Test APIs against local server |
Build & Analysis
| Command | Description |
|---|---|
pnpm analyze |
Build and analyze bundle size |
Project Structure
Understanding the project structure will help you navigate and customize the codebase.
NOMADSTORE/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── admin/ # Admin dashboard pages
│ │ ├── api/ # API routes
│ │ ├── dashboard/ # User dashboard
│ │ ├── products/ # Product pages
│ │ └── ...
│ ├── components/ # React components
│ │ ├── admin/ # Admin-specific components
│ │ ├── ui/ # shadcn/ui components
│ │ └── ...
│ ├── utils/ # Utility functions
│ ├── hooks/ # Custom React hooks
│ └── providers/ # Context providers
├── supabase/
│ ├── migrations/ # Database migrations
│ ├── init_database.sql # Complete database schema
│ └── scripts/ # Supabase scripts
├── public/ # Static assets
├── scripts/ # Build and utility scripts
├── .env.example # Environment variables template
├── package.json # Dependencies and scripts
└── next.config.js # Next.js configuration
Key Directories
src/app/- All pages and API routes using Next.js App Routersrc/components/- Reusable React componentssrc/utils/- Helper functions and utilitiessupabase/migrations/- Database migration filespublic/- Static files (images, fonts, etc.)
Database Setup
Setting up the database and creating your admin account.
Setting Up the Database
To set up your database, you need to run the SQL initialization script in Supabase:
- Open the file
supabase/init_database.sqlin your project folder - Select all the content (Ctrl+A or Cmd+A)
- Copy the entire content (Ctrl+C or Cmd+C)
- Go to your Supabase Dashboard
- Navigate to SQL Editor in the left sidebar
- Click on New Query or open the SQL Editor
- Paste the entire content you copied (Ctrl+V or Cmd+V)
- Click the Run button (or press Ctrl+Enter / Cmd+Enter)
- Wait for the script to complete - this may take a few minutes
init_database.sql file.
This file contains all the necessary tables, functions, policies, and initial data for your store to work properly.
Creating Your Admin Account
After setting up the database, you need to promote your user account to admin:
- Sign up for an account on your site (or use GitHub OAuth)
- Go to your Supabase Dashboard → SQL Editor
- Run this SQL query (replace
your-email@example.comwith your actual email address):
UPDATE public.user_profiles
SET role = 'admin', updated_at = NOW()
WHERE id = (
SELECT id FROM auth.users WHERE email = 'your-email@example.com'
);
Click Run to execute the query.
Verifying Admin Access
- Log out from your account
- Log back in (important for session refresh)
- Navigate to
/admin- you should see the admin dashboard
Features Overview
Nomad Store comes with a comprehensive set of features out of the box.
Core Features
- Product Management - Create, edit, and manage digital products
- Category System - Organize products with categories and custom icons
- Order Management - Track orders, payments, and customer information
- User Authentication - Email/password and GitHub OAuth
- Role-Based Access - Admin and buyer roles with different permissions
- Payment Processing - Stripe and PayPal integration
- Digital Downloads - Secure file delivery system
- Email Notifications - Automated emails for orders, tickets, etc.
- Review System - Product reviews and ratings
- Rewards Program - Points, gifts, and referral system
- Support Tickets - Customer support ticket system
- Promo Codes - Discount codes and coupons
- 2FA Security - Two-factor authentication for enhanced security
Admin Dashboard
The admin dashboard provides complete control over your store.
Accessing the Dashboard
Navigate to /admin after logging in as an admin user.
Dashboard Sections
- Overview - Store statistics and recent orders
- Store - Product and category management
- Orders - View and manage all orders
- Users - User management (disabled in demo mode)
- Reviews - Manage product reviews
- Rewards - Configure rewards program
- Promo Codes - Create and manage discount codes
- Referrals - Referral program management
- Tickets - Customer support tickets
- System Settings - Configure system-wide settings
- Email Templates - Customize email templates
- Features - Enable/disable features
Payment Gateways
Nomad Store supports multiple payment gateways for flexible payment processing.
Supported Gateways
- Stripe - Credit cards, Apple Pay, Google Pay
- PayPal - PayPal payments and subscriptions
- HoodPay - Custom payment gateway plugin
Configuring Payment Gateways
Configure payment gateways from the admin dashboard:
- Go to Admin → System → Payment Gateway
- Enter your API keys and credentials
- Test the connection
- Enable the gateway
Email System
Nomad Store includes a comprehensive email notification system.
Email Templates
Manage email templates from Admin → Email Templates:
- Welcome emails
- Order confirmations
- New order notifications
- Ticket notifications
SMTP Configuration
Configure SMTP settings from Admin → System → SMTP Settings:
- SMTP host and port
- Authentication credentials
- From email and name
Deployment
Deploy your Nomad Store to production.
Vercel Deployment (Recommended)
- Upload your project folder to a Git repository (GitHub, GitLab, etc.) if you want to use Vercel's Git integration, or use Vercel CLI
- Import your project in Vercel (via Git or CLI)
- Add environment variables in Vercel dashboard
- Deploy!
vercel in your project folder.
Environment Variables for Production
Make sure to set these in your deployment platform:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYNEXT_PUBLIC_SITE_URL(your production URL)
Pre-Deployment Checklist
- ✅ All migrations applied to production database
- ✅ Environment variables configured
- ✅ Payment gateway keys set (production keys)
- ✅ SMTP settings configured
- ✅ Admin account created
- ✅ Custom domain configured (if applicable)
- ✅ SSL certificate active
Troubleshooting
Common issues and their solutions.
Database Connection Issues
Problem: Cannot connect to Supabase
Solution:
- Verify your
.env.localhas correct Supabase credentials - Check that your Supabase project is active
- Ensure your IP is not blocked in Supabase dashboard
Migration Errors
Problem: Database setup fails
Solution:
- Check that you've copied the entire content of
supabase/init_database.sqlinto the Supabase SQL Editor - Verify that your Supabase project is active and accessible
- Check the Supabase SQL Editor logs for any error messages
Admin Access Denied
Problem: Cannot access admin panel after promoting
Solution:
- Clear browser cache and cookies
- Log out and log back in
- Check the debug page:
/debug-admin - Verify role in database:
SELECT role FROM user_profiles WHERE id = 'your-user-id'
Build Errors
Problem: Build fails with TypeScript errors
Solution:
- Run
pnpm type-checkto see all errors - Ensure all dependencies are installed:
pnpm install - Clear Next.js cache:
rm -rf .next
Payment Gateway Issues
Problem: Payments not processing
Solution:
- Verify API keys are correct
- Check you're using test keys in development
- Review payment gateway logs in admin dashboard
- Test with test card numbers (Stripe) or sandbox account (PayPal)
Roadmap
This roadmap outlines potential future features and enhancements for Nomad Store. These features are subject to change based on user feedback and development priorities.
T4 2025 | T1 2026
- • Multi-language support (i18n)
- • Multi-currency support
- • Recurring subscriptions
- • Advanced coupon system
- • Integration with more payment gateways
- • Public REST API
- • Customizable webhooks
- • Advanced analytics
- • Data export
- • Maintenance mode
- • Advanced tagging system
- • Improved search
- • Advanced product filters
- • Wishlist/Favorites
- • Product comparison
- • Product comments system
- • Integrated blog
- • Customizable pages
- • Marketing integration (email campaigns)
- • Detailed financial reports
- • Accounting integration
Need Help? We're Here for You
If you have any questions, need assistance, or want to connect with other users, join our Discord community!
Get support, share ideas, and connect with the community