A comprehensive e-commerce platform with integrated Meta (Facebook/Instagram) advertising management
Quick Start β’ Features β’ Documentation β’ API Reference
- Overview
- Features
- Technology Stack
- Project Structure
- Quick Start
- Installation
- Configuration
- API Endpoints
- Documentation
- Testing
- Troubleshooting
- Roadmap
- Contributing
- Support
Orbit 360 is a full-stack e-commerce platform that seamlessly integrates with Meta's advertising ecosystem. Built with modern technologies, it provides businesses with powerful tools to manage their online store while running effective advertising campaigns on Facebook and Instagram.
- All-in-One Solution: Complete e-commerce platform with built-in Meta Ads management
- Enterprise Ready: Robust security, scalability, and multi-tenant architecture
- Developer Friendly: Well-documented APIs, clean code structure, and comprehensive guides
- Production Grade: Battle-tested integrations with OAuth 2.0, JWT authentication, and encrypted storage
| Feature | Description |
|---|---|
| Multi-Tenant Architecture | Manage multiple stores from a single platform |
| Product Management | Full catalog with variants, inventory tracking, and categories |
| Order Processing | End-to-end order management with status tracking |
| Customer Management | Comprehensive customer profiles and order history |
| Analytics Dashboard | Real-time insights into sales, revenue, and performance |
| Customizable Layouts | Flexible UI components and theming options |
| Feature | Description |
|---|---|
| OAuth 2.0 Connection | Secure authentication with Meta Business accounts |
| Ad Account Management | View and switch between multiple ad accounts |
| Campaign Operations | Create, pause, resume, and manage campaigns |
| Real-Time Insights | Track impressions, clicks, spend, and conversions |
| Budget Tracking | Monitor spending and optimize campaign budgets |
| Multiple Objectives | Support for various campaign goals (traffic, conversions, etc.) |
- JWT-based authentication with secure token management
- Encrypted Meta token storage using AES-256
- Rate limiting on all API endpoints
- CORS protection with configurable origins
- OAuth 2.0 implementation for Meta integration
- Permission-based access control
- Automatic token expiry handling and refresh
Runtime: Node.js 18+
Framework: Express.js
Databases: PostgreSQL (via Prisma ORM), MongoDB (via Mongoose)
Authentication: JWT, OAuth 2.0
Security: Helmet, CORS, Rate Limiting, bcrypt
API Client: Axios (Meta Marketing API)
Framework: Next.js 16 (App Router)
Language: TypeScript
Styling: Tailwind CSS
UI Components: Shadcn/ui
State: React Hooks
Notifications: Sonner
HTTP Client: Fetch API
D:\orbit\
βββ backend/ # Node.js + Express Backend
β βββ src/
β β βββ controllers/ # Request handlers
β β β βββ metaController.js # Meta API operations
β β β βββ metaOAuthController.js # OAuth flow handlers
β β β βββ authController.js # Authentication
β β β βββ storeController.js # Store management
β β β βββ productController.js # Product CRUD
β β β βββ orderController.js # Order processing
β β βββ routes/ # API route definitions
β β β βββ meta.js # Meta endpoints
β β β βββ metaOAuth.js # OAuth routes
β β β βββ auth.js # Auth routes
β β β βββ ...
β β βββ services/ # Business logic layer
β β β βββ metaApiService.js # Meta API wrapper
β β β βββ ...
β β βββ middleware/ # Express middleware
β β β βββ auth.js # JWT verification
β β β βββ rateLimiter.js # Rate limiting
β β β βββ errorHandler.js # Error handling
β β βββ models/ # Database schemas
β β β βββ User.js # Mongoose User model
β β β βββ ...
β β βββ config/ # Configuration files
β β β βββ database.js # DB connections
β β βββ utils/ # Helper functions
β βββ prisma/
β β βββ schema.prisma # PostgreSQL schema
β β βββ migrations/ # Database migrations
β βββ package.json
β βββ .env.example # Environment template
β βββ README.md
β
βββ software/Orbit-360/ # Next.js Frontend
β βββ app/
β β βββ (auth)/ # Auth routes group
β β β βββ login/
β β β βββ register/
β β βββ dashboard/ # Main dashboard
β β βββ integrations/ # Integration management
β β β βββ page.tsx # Meta integration UI
β β βββ sales/ # Sales & orders
β β βββ products/ # Product management
β β βββ layout.tsx # Root layout
β βββ components/ # React components
β β βββ ui/ # Shadcn components
β β βββ meta/ # Meta-specific components
β β βββ ...
β βββ lib/ # Utilities
β βββ public/ # Static assets
β βββ package.json
β βββ README_META_INTEGRATION.md
β
βββ docs/ # Documentation
βββ QUICK_START.md # 10-minute setup
βββ META_INTEGRATION_SETUP.md # Detailed Meta setup
βββ INTEGRATION_SUMMARY.md # Technical overview
βββ API_REFERENCE.md # API documentation
Get Orbit 360 running locally in 10 minutes:
Ensure you have the following installed:
- Node.js 18.x or higher (Download)
- PostgreSQL 14.x or higher (Download)
- MongoDB 6.x or higher (Download)
- Git (Download)
- Meta Developer Account (Sign Up)
git clone <repository-url>
cd orbit# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
# Required: DATABASE_URL, MONGODB_URI, JWT_SECRET, META credentials
# Run database migrations
npx prisma migrate dev
# Generate Prisma client
npx prisma generate
# Seed the database (optional)
npm run seed
# Start the backend server
npm run devBackend will start on http://localhost:5000
# Open new terminal, navigate to frontend
cd software/Orbit-360
# Install dependencies
npm install
# Create environment file
echo "NEXT_PUBLIC_API_URL=http://localhost:5000" > .env.local
# Start the frontend server
npm run devFrontend will start on http://localhost:3000
- Open http://localhost:3000 in your browser
- You should see the Orbit 360 login page
- Register a new account or use seeded credentials
- Navigate to the dashboard
After installation, follow these steps:
- Create Your Store: Go to Stores β Create New Store
- Add Products: Navigate to Products β Add Product
- Connect Meta (Optional): Go to Integrations β Connect Meta Account
For detailed setup instructions, see QUICK_START.md
Create a .env file in the backend/ directory:
# ======================
# Database Configuration
# ======================
DATABASE_URL="postgresql://username:password@localhost:5432/orbit360"
MONGODB_URI="mongodb://localhost:27017/orbit360"
# ======================
# JWT Configuration
# ======================
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
JWT_EXPIRE="7d"
JWT_REFRESH_SECRET="your-refresh-token-secret"
JWT_REFRESH_EXPIRE="30d"
# ======================
# Meta Integration
# ======================
META_APP_ID="your-meta-app-id"
META_APP_SECRET="your-meta-app-secret"
META_REDIRECT_URI="http://localhost:5000/auth/meta/callback"
META_API_VERSION="v19.0"
META_TOKEN_ENC_KEY="your-32-character-encryption-key"
# ======================
# Server Configuration
# ======================
NODE_ENV="development"
PORT=5000
FRONTEND_URL="http://localhost:3000"
# ======================
# CORS Configuration
# ======================
CORS_ORIGIN="http://localhost:3000"
# ======================
# Email Configuration (Optional)
# ======================
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASSWORD="your-app-password"Create a .env.local file in the software/Orbit-360/ directory:
NEXT_PUBLIC_API_URL="http://localhost:5000"
NEXT_PUBLIC_APP_NAME="Orbit 360"
NEXT_PUBLIC_APP_URL="http://localhost:3000"To enable Meta integration:
- Go to Meta Developers
- Create a new app (Business type)
- Add Facebook Login product
- Configure OAuth Redirect URI:
http://localhost:5000/auth/meta/callback - Add required permissions:
ads_management,ads_read,business_management - Copy App ID and App Secret to your
.envfile
See META_INTEGRATION_SETUP.md for detailed instructions.
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/register |
Register new user | β |
POST |
/api/auth/login |
User login | β |
POST |
/api/auth/refresh |
Refresh access token | β |
POST |
/api/auth/logout |
User logout | β |
POST |
/api/auth/forgot-password |
Request password reset | β |
POST |
/api/auth/reset-password |
Reset password | β |
GET |
/api/auth/verify-email/:token |
Verify email address | β |
GET |
/api/auth/me |
Get current user | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/auth/meta/login |
Initiate OAuth flow | β |
GET |
/auth/meta/callback |
OAuth callback handler | β |
GET |
/api/meta/status |
Check connection status | β |
DELETE |
/api/meta/disconnect |
Disconnect Meta account | β |
GET |
/api/meta/ad-accounts |
List ad accounts | β |
GET |
/api/meta/campaigns |
List campaigns | β |
POST |
/api/meta/campaigns |
Create new campaign | β |
GET |
/api/meta/campaigns/:id |
Get campaign details | β |
PATCH |
/api/meta/campaigns/:id/pause |
Pause campaign | β |
PATCH |
/api/meta/campaigns/:id/resume |
Resume campaign | β |
DELETE |
/api/meta/campaigns/:id |
Delete campaign | β |
GET |
/api/meta/insights |
Get performance insights | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/stores |
List all stores | β |
POST |
/api/stores |
Create new store | β |
GET |
/api/stores/:id |
Get store details | β |
PUT |
/api/stores/:id |
Update store | β |
DELETE |
/api/stores/:id |
Delete store | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/products |
List products | β |
POST |
/api/products |
Create product | β |
GET |
/api/products/:id |
Get product details | β |
PUT |
/api/products/:id |
Update product | β |
DELETE |
/api/products/:id |
Delete product | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/orders |
List orders | β |
POST |
/api/orders |
Create order | β |
GET |
/api/orders/:id |
Get order details | β |
PUT |
/api/orders/:id |
Update order | β |
DELETE |
/api/orders/:id |
Cancel order | β |
For detailed API documentation with request/response examples, see API_REFERENCE.md
- QUICK_START.md - Get started in 10 minutes
- META_INTEGRATION_SETUP.md - Comprehensive Meta setup guide
- INTEGRATION_SUMMARY.md - Implementation overview
- software/Orbit-360/README_META_INTEGRATION.md - Frontend documentation
- backend/README.md - Backend API documentation
- Start both servers (backend and frontend)
- Navigate to http://localhost:3000
- Log in with your credentials
- Go to Integrations page
- Click Connect Meta Account
- Complete OAuth flow
- Test the following features:
- View ad accounts
- List campaigns
- Create a test campaign
- View campaign insights
- Pause/Resume campaign
- Create a new store
- Add sample products
- Create a test order
- View order in dashboard
- Check analytics
To apply Meta integration database changes:
cd backend
# Option 1: Using migration script
node migrate-meta.js
# Option 2: Using Prisma
npx prisma migrate dev --name add_meta_fields
npx prisma generateSymptoms: Server crashes or won't start
Solutions:
# Check if PostgreSQL is running
sudo service postgresql status
# Check if MongoDB is running
sudo service mongod status
# Verify DATABASE_URL format
# Correct: postgresql://user:pass@localhost:5432/dbname
# Check if port 5000 is available
lsof -i :5000
# If occupied, change PORT in .envSymptoms: API calls fail, CORS errors
Solutions:
# Verify backend is running
curl http://localhost:5000/api/health
# Check NEXT_PUBLIC_API_URL in .env.local
# Should match backend URL exactly
# Review browser console for errors
# Check Network tab for failed requestsSymptoms: Redirect fails, "Invalid redirect URI" error
Solutions:
- Verify
META_REDIRECT_URIin.envmatches Meta app settings exactly - Ensure Meta app is in development mode (allows localhost)
- Check that required permissions are granted in Meta app
- Verify App ID and App Secret are correct
- Clear browser cookies and try again
Symptoms: Meta API calls fail with authentication error
Solutions:
- Reconnect Meta account from Integrations page
- Verify
META_TOKEN_ENC_KEYhasn't changed - Check token expiry settings in Meta app
- Review backend logs for token refresh errors
Symptoms: "Can't reach database server" error
Solutions:
# For PostgreSQL
# Check connection string format
DATABASE_URL="postgresql://user:password@localhost:5432/orbit360"
# Test connection
psql -U user -d orbit360
# For MongoDB
# Check connection string
MONGODB_URI="mongodb://localhost:27017/orbit360"
# Test connection
mongosh "mongodb://localhost:27017/orbit360"For more troubleshooting help, see META_INTEGRATION_SETUP.md
- Core e-commerce platform with multi-tenant support
- User authentication and authorization
- Store and product management
- Order processing system
- Meta OAuth 2.0 integration
- Ad account and campaign management
- Real-time performance insights
- Comprehensive documentation
- Advanced campaign analytics dashboard
- Mobile app optimization
- Email notification system
- Inventory management system
- Ad set creation and management
- Creative asset uploads
- Advanced audience targeting
- Campaign templates
- Bulk campaign operations
- A/B testing interface
- Automated campaign optimization
- Budget recommendation engine
- Multi-account management
- Advanced reporting and export
- AI-powered campaign suggestions
- Integration with Google Ads
- Multi-language support
- White-label solution
- Mobile applications (iOS/Android)
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Follow existing code structure
- Write clean, documented code
- Add tests for new features
- Test thoroughly
- Test all affected features
- Ensure no breaking changes
- Commit your changes
git commit -m "Add amazing feature" - Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
- JavaScript/TypeScript: Use ESLint configuration
- Formatting: Prettier with 2-space indentation
- Naming: camelCase for variables, PascalCase for components
- Comments: JSDoc for functions, inline for complex logic
- Security: Never commit secrets or API keys
- Provide clear description of changes
- Reference related issues
- Update documentation if needed
- Ensure all tests pass
- Follow commit message conventions
This project is licensed under the MIT License.
MIT License
Copyright (c) 2026 Orbit 360
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Documentation: Check the
/docsfolder for comprehensive guides - Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@orbit360.com
When reporting bugs, please include:
- Clear description of the issueaort
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Node version, etc.)
- Relevant logs or screenshots
We love hearing your ideas! Submit feature requests through GitHub Issues with the enhancement label.
Built with these amazing technologies:
- Next.js - React framework
- Express.js - Backend framework
- Prisma - Database ORM
- Meta Marketing API - Advertising platform
- Tailwind CSS - Styling
- Shadcn/ui - UI components
Made with β€οΈ by the Orbit 360 Team
Website β’ Documentation β’ Report Bug β’ Request Feature