NudgeCampaign MVP - Service Access Guide
Status: Generated Post-Build
Purpose: Complete guide for accessing all system services and admin interfaces
Build Version: build-v1
System Overview
NudgeCampaign MVP consists of multiple interconnected services. This guide provides access URLs, credentials, and configuration instructions for all components.
Main Application
NudgeCampaign Web App
- URL: http://localhost:3001
- Access: Direct browser access
- Purpose: Main user interface for campaign management
- Status: Fully functional
Available Pages:
- Dashboard: http://localhost:3001/ - System overview and statistics
- Campaigns: http://localhost:3001/campaigns - Email campaign management
- Contacts: http://localhost:3001/contacts - Contact list management
- Automations: http://localhost:3001/automations - n8n workflow interface
Database Services
Supabase Database
- PostgreSQL Direct Access: localhost:54322
- Status: Running via Docker
- Admin Interface: Supabase Studio not running (Docker image version issues)
Database Access:
# Direct PostgreSQL connection
Host: localhost
Port: 54322
Database: postgres
Username: postgres
Password: postgres
Database Connection String:
postgresql://postgres:postgres@localhost:54322/postgres
Supabase Admin Interface:
- Status: NOT ACCESSIBLE - Docker container failed to start
- Issue: Supabase Studio image versions incompatible
- Alternative: Use direct PostgreSQL connection or tools like pgAdmin, DBeaver, etc.
- Expected URL: http://localhost:54323 (when working)
Alternative Database Access Methods:
- Command Line:
psql postgresql://postgres:postgres@localhost:54322/postgres - pgAdmin: Connect using the credentials above
- DBeaver: Database management tool
- VS Code Extensions: PostgreSQL client extensions
Key Tables:
users- User accounts and profilescampaigns- Email campaign datacontacts- Contact managementautomations- n8n workflow tracking
Automation Services
n8n Workflow Automation
- URL: http://localhost:5678
- Access: Direct browser access
- Purpose: Visual workflow automation builder
- Status: Requires initial setup
Current Issues:
β 401 Unauthorized errors in application logs
β No initial workflows configured
β Authentication may need configuration
Setup Instructions Needed:
- Access n8n at http://localhost:5678
- Complete initial setup wizard
- Configure authentication credentials
- Import or create initial workflows
- Test workflow execution
Integration Points:
- API Endpoint: http://localhost:5678/api/v1/
- Webhooks: Available for campaign triggers
- Postmark Integration: For email sending
Email Services
Postmark Email Service
- Provider: External SaaS (postmarkapp.com)
- Purpose: Transactional email delivery
- Status: Requires account configuration
Account Information Needed:
Postmark Account: [User needs to provide]
Server Token: [To be configured in environment]
From Domain: knowcode.tech (configured)
From Email: lindsay@knowcode.tech (configured)
Configuration Status:
- Environment Variable: POSTMARK_API_TOKEN (needs setting)
- From Address: lindsay@knowcode.tech
- Message Stream: marketing
- Domain: knowcode.tech
Setup Instructions:
- Create Postmark account at https://postmarkapp.com
- Set up sender signature for knowcode.tech domain
- Get server token from Postmark dashboard
- Update environment variable: POSTMARK_API_TOKEN=your_token_here
- Test email delivery through application
MailDev (Development Email Testing)
- URL: http://localhost:1080
- Purpose: Local email testing and debugging
- Status: Available for development
Features:
- View all outgoing emails
- Debug email formatting
- Test email delivery without external service
Development Tools
Docker Container Management
- Tool: Docker Desktop or
docker-compose - Config File:
docker-compose.yml - Purpose: Manage all service containers
Container Status Check:
# View running containers
docker ps
# View container logs
docker-compose logs [service-name]
# Restart services
docker-compose restart [service-name]
Available Services:
nudgecampaign-app- Main Next.js applicationsupabase-db- PostgreSQL databasesupabase-studio- Database admin interfacen8n- Workflow automation enginemaildev- Development email server
API Endpoints
Application APIs
- Base URL: http://localhost:3001/api
- Authentication: Currently uses demo user ID
Available Endpoints:
GET /api/campaigns - List campaigns
POST /api/campaigns - Create campaign
GET /api/campaigns/[id] - Get campaign details
β PUT /api/campaigns/[id] - Update campaign (NOT IMPLEMENTED)
DELETE /api/campaigns/[id] - Delete campaign
GET /api/contacts - List contacts
POST /api/contacts - Create contact
GET /api/contacts/[id] - Get contact details
β PUT /api/contacts/[id] - Update contact (NOT IMPLEMENTED)
DELETE /api/contacts/[id] - Delete contact
GET /api/automations - List n8n workflows
POST /api/automations/welcome-series - Create welcome workflow
GET /api/system-test - System health check
POST /api/test-email - Send test email
Security & Access
Authentication Status:
- Current: Hardcoded demo user (DEMO_USER_ID)
- Missing: Supabase Auth integration
- Required: Multi-tenant user management
Admin Access Needed:
- User Management: No admin portal implemented
- Subscription Management: Not implemented
- System Configuration: Via Docker and environment variables
Configuration Files
Environment Variables (.env.local):
# Database
SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=[from Supabase dashboard]
DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:54322/postgres
# Email
POSTMARK_API_TOKEN=[needs configuration]
# n8n
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=[needs configuration]
N8N_BASIC_AUTH_PASSWORD=[needs configuration]
Docker Configuration (docker-compose.yml):
- Database passwords and ports
- Service networking configuration
- Volume mounts for data persistence
Known Issues & Setup Required
Critical Setup Tasks:
Supabase Studio Admin Interface:
- BROKEN: Docker image version incompatible (
supabase/studio:20231123-ce42139not found) - Fix Docker image versions for Supabase services
- Alternative: Use external database tools (pgAdmin, DBeaver) to access PostgreSQL
- Direct database access working on port 54322
- BROKEN: Docker image version incompatible (
Postmark Email Service:
- Create Postmark account
- Configure sender domain verification
- Set POSTMARK_API_TOKEN environment variable
n8n Automation Platform:
- Complete initial setup wizard at http://localhost:5678
- Configure authentication (admin/password)
- Create initial workflows
- Test workflow execution
Multi-Tenant Authentication:
- Enable Supabase Auth
- Create user signup/login flows
- Implement admin portal
- Remove hardcoded demo user
Edit Functionality:
- Implement campaign editing
- Implement contact editing
- Create edit forms and API endpoints
Quick Start Checklist
For Immediate Use:
- Verify all containers running:
docker ps - Access main app: http://localhost:3001
- Check database: http://localhost:54323
- Test email dev server: http://localhost:1080
For Production Setup:
- Configure Postmark email service
- Set up n8n authentication and workflows
- Enable Supabase Auth for multi-tenancy
- Implement missing edit functionality
- Create admin portal for user management
External Service Dependencies
Required External Accounts:
- Postmark (https://postmarkapp.com) - Email delivery
- Supabase (https://supabase.io) - Database hosting (for production)
- Domain Management - For email domain verification
Optional External Services:
- n8n Cloud - Hosted automation (alternative to self-hosted)
- Monitoring Services - Application performance monitoring
- CDN Services - Static asset delivery
π Support & Troubleshooting
Common Issues:
n8n 401 Unauthorized:
- Access http://localhost:5678 and complete setup
- Configure authentication credentials
- Restart containers if needed
Email Not Sending:
- Check Postmark configuration
- Verify POSTMARK_API_TOKEN is set
- Use MailDev for local testing
Database Connection Issues:
- Verify Docker containers are running
- Check database credentials in .env.local
- Restart Supabase container if needed
Log Files:
- Application Logs:
dev-server.log - Docker Logs:
docker-compose logs [service] - Browser Console: For frontend debugging
This service access guide should have been automatically generated during the autonomous build process. Framework v2 will ensure complete operational documentation is provided with every build.