A Next.js admin dashboard for managing orders, suppliers, and operations with Supabase backend.
- Order management system with status tracking
- Supplier management and pricing
- Financial tracking and reporting
- Role-based access control (Admin, Employee, Supplier)
- Real-time notifications
- Integration with FUT Transfer API
- Salla webhook integration
- Framework: Next.js 16 (App Router)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- UI: React 19, TailwindCSS 4, shadcn/ui
- Charts: Recharts
- Forms: React Hook Form + Zod
- Node.js 18+
- npm/yarn/pnpm
- Supabase account and project
-
Clone the repository
-
Install dependencies:
npm install- Set up environment variables:
Copy .env.example to .env.local:
cp .env.example .env.localThen edit .env.local and add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-keyGet these from: https://app.supabase.com/project/_/settings/api
- Run database migrations:
Execute the SQL files in the supabase-migrations/ folder in your Supabase SQL editor, or use the provided supabase-schema.sql for a complete schema setup.
- Start the development server:
npm run dev- Open http://localhost:3000 - you'll be redirected to the login page.
-
Push your code to a Git repository (GitHub, GitLab, or Bitbucket)
-
Go to Vercel and import your repository
-
IMPORTANT: Configure environment variables in Vercel:
- Go to: Project Settings > Environment Variables
- Add the following variables:
NEXT_PUBLIC_SUPABASE_URL= your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY= your Supabase anon key
-
Deploy! Vercel will automatically detect Next.js and use the optimal settings.
For Netlify, Cloudflare Pages, or other platforms:
- Set the build command:
npm run build - Set the output directory:
.next - Set Node version:
18or higher - CRITICAL: Add environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
If you see the default Next.js starter page after deployment:
- Check environment variables are set in your deployment platform
- Verify build logs for any errors
- Clear cache and redeploy
- Check middleware is working by testing
/logindirectly - Ensure your Supabase project URL is accessible from the deployment environment
src/
├── app/
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Protected dashboard pages
│ ├── api/ # API routes and webhooks
│ └── page.tsx # Root redirect to login
├── components/ # React components
├── lib/ # Utilities and integrations
├── hooks/ # Custom React hooks
└── types/ # TypeScript types
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Your Supabase project URL | Yes |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Your Supabase anonymous key | Yes |
Private project - All rights reserved.