|
Some checks failed
Deploy to Production / Deploy to Production (push) Has been cancelled
- Update Docker port bindings to listen on 0.0.0.0 for external access - Configure CORS to allow multiple origins (local and external IPs) - Update frontend to run on all interfaces (0.0.0.0:3001) - Set frontend URL to static IP 83.151.203.105:3001 Changes: - docker-compose.yml: Bind postgres, n8n, backend to 0.0.0.0 - backend CORS: Allow localhost, 192.168.1.180, and 83.151.203.105 - frontend: Run on 0.0.0.0:3001 for external accessibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| backend | ||
| frontend | ||
| .cursorrules | ||
| .gitignore | ||
| CREATE_ADMIN.md | ||
| CREDITS_UPDATE_FIX.md | ||
| DESIGN_SYSTEM_REDESIGN.md | ||
| DESIGN_SYSTEM_UPDATE.md | ||
| docker-compose.override.example.yml | ||
| docker-compose.prod.yml | ||
| docker-compose.yml | ||
| IMPLEMENTATION_SUMMARY.md | ||
| Makefile | ||
| MCP_INTEGRATION.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| test-checkout.sh | ||
n8n SaaS Marketplace
A comprehensive platform for discovering, purchasing, and deploying n8n workflows. This marketplace enables users to browse pre-built automation workflows, subscribe to workflow packages, and seamlessly integrate them into their n8n instances.
Features
- Workflow Marketplace: Browse and discover pre-built n8n workflows
- User Authentication: Secure user registration and login system
- Subscription Management: Stripe-powered payment processing for workflow subscriptions
- AI-Powered Recommendations: Azure OpenAI integration for personalized workflow suggestions
- Real-time Updates: Redis caching for optimal performance
- Modern UI: Built with Next.js 15 and React 19
Tech Stack
Backend
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: PostgreSQL with Prisma ORM
- Cache: Redis
- Authentication: JWT with bcrypt
- Payments: Stripe
- AI: Azure OpenAI
Frontend
- Framework: Next.js 15
- UI: React 19 with Tailwind CSS
- State Management: Zustand
- Data Fetching: TanStack Query (React Query)
- HTTP Client: Axios
Infrastructure
- Containerization: Docker & Docker Compose
- n8n: Self-hosted n8n instance
- Database: PostgreSQL 16
- Cache: Redis 7
Project Structure
n8n-saas-marketplace/
├── backend/ # Backend API
│ ├── src/ # Source code
│ ├── prisma/ # Database schema and migrations
│ ├── package.json
│ ├── tsconfig.json
│ └── .env.example
├── frontend/ # Frontend application
│ ├── src/
│ │ ├── app/ # Next.js app directory
│ │ ├── components/ # React components
│ │ └── lib/ # Utility functions
│ ├── public/ # Static assets
│ ├── package.json
│ ├── tsconfig.json
│ ├── tailwind.config.ts
│ ├── next.config.ts
│ └── .env.example
├── docker-compose.yml # Docker services configuration
├── Makefile # Convenience commands
├── package.json # Root package.json with workspaces
└── README.md
Getting Started
Prerequisites
- Node.js 18+ and npm
- Docker and Docker Compose
- Git
Installation
-
Clone the repository
git clone <repository-url> cd n8n-saas-marketplace -
Install dependencies
npm run install:all -
Set up environment variables
Docker Compose Override (Required for secrets):
cp docker-compose.override.example.yml docker-compose.override.ymlEdit
docker-compose.override.ymland fill in your actual API keys:AZURE_OPENAI_API_KEY- Your Azure OpenAI API keyJWT_SECRET- Generate with:openssl rand -base64 32ENCRYPTION_KEY- Generate with:openssl rand -hex 32STRIPE_SECRET_KEY- Your Stripe secret key (if using payments)STRIPE_WEBHOOK_SECRET- Your Stripe webhook secret (if using payments)
Backend .env (Optional - for running outside Docker):
cp backend/.env.example backend/.env # Edit backend/.env with your configurationFrontend .env (Optional):
cp frontend/.env.example frontend/.env # Edit frontend/.env with your configuration -
Start Docker services
make up # or: docker-compose up -dThis will start:
- PostgreSQL (port 5432)
- Redis (port 6379)
- n8n (port 5678)
- Backend API (port 4000)
Note: Docker Compose automatically merges
docker-compose.ymlwithdocker-compose.override.yml, so your secrets are loaded securely without being committed to git. -
Run database migrations
make db-migrate -
Access the application
- Frontend: http://localhost:3001
- Backend API: http://localhost:4000
- n8n: http://localhost:5678
Security Notes
⚠️ IMPORTANT: Never commit secrets to git!
docker-compose.override.ymlcontains your actual API keys and secrets- This file is gitignored and should NEVER be committed
- Always use
docker-compose.override.example.ymlas a template - For production, use environment variables or secure secret management services
Available Commands
Makefile Commands
make up- Start all Docker servicesmake down- Stop all Docker servicesmake logs- View logs from all servicesmake clean- Stop services and remove volumesmake restart- Restart all servicesmake backend-shell- Run backend in development modemake db-migrate- Run database migrationsmake help- Show all available commands
NPM Commands
npm run dev- Start both backend and frontend in development modenpm run dev:backend- Start only backendnpm run dev:frontend- Start only frontendnpm run build- Build both applicationsnpm run build:backend- Build backendnpm run build:frontend- Build frontend
Development
Backend Development
cd backend
npm run dev # Start development server
npm run db:generate # Generate Prisma client
npm run db:push # Push schema changes to database
npm run db:migrate # Run migrations
npm run db:studio # Open Prisma Studio
Frontend Development
cd frontend
npm run dev # Start Next.js development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
Environment Variables
Backend (.env)
PORT- Backend server port (default: 4000)DATABASE_URL- PostgreSQL connection stringJWT_SECRET- Secret key for JWT token generationREDIS_URL- Redis connection URLN8N_API_URL- n8n instance API URLSTRIPE_SECRET_KEY- Stripe secret key for paymentsAZURE_OPENAI_ENDPOINT- Azure OpenAI service endpoint
Frontend (.env)
NEXT_PUBLIC_API_URL- Backend API URLNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY- Stripe publishable key
License
ISC