This guide walks you through the complete manual setup process for Nuda Kit. Make sure you've completed all the Prerequisites before starting.
After downloading Nuda Kit, navigate to the backend folder and create your environment files.
1. Create the main .env file:
cp .env.example .env
2. Create the test environment file:
Create a .env.test file with minimal configuration for running tests:
NODE_ENV=test
DB_DATABASE=test
.env.test file overrides only the necessary variables.Open backend/.env and configure the following sections based on your needs:
If you want to enable social login, add credentials for your preferred providers:
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:3333/auth/google/callback
# GitHub OAuth
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:3333/auth/github/callback
# Facebook OAuth
FACEBOOK_CLIENT_ID=your_facebook_client_id
FACEBOOK_CLIENT_SECRET=your_facebook_client_secret
FACEBOOK_CALLBACK_URL=http://localhost:3333/auth/facebook/callback
If you plan to use AI features, add your API key for at least one provider:
# OpenAI
OPENAI_API_KEY=sk-your_openai_api_key
# Google AI (Gemini)
GOOGLE_API_KEY=your_google_api_key
# Anthropic (Claude)
ANTHROPIC_API_KEY=your_anthropic_api_key
Add your Stripe secret key to enable billing features:
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
sk_test_).env file is already in .gitignore.Before running seeders, configure your subscription plans in backend/database/seeders/plan_seeder.ts:
await Plan.createMany([
{
name: 'Pro',
key: 'pro',
stripePriceId: 'price_xxx', // Add your Stripe Price ID
mode: PlanMode.SUBSCRIPTION,
isActive: true,
},
{
name: 'Ultimate',
key: 'ultimate',
stripePriceId: 'price_xxx', // Add your Stripe Price ID
mode: PlanMode.SUBSCRIPTION,
isActive: true,
},
])
price_)You can add, remove, or rename plans as needed for your application.
Start the development infrastructure using Docker Compose:
cd etc/docker
docker compose -f docker-compose-development.yml up -d
This starts the following services:
| Service | Container | Port | Purpose |
|---|---|---|---|
| PostgreSQL | nudakit_postgres | 5432 | Primary database |
| Redis | nudakit_redis | 6379 | Queue processing |
| MailHog | nudakit_mailhog | 1025, 8025 | Email testing |
| Stripe CLI | nudakit_stripe | - | Webhook forwarding |
After Docker starts, retrieve the webhook signing secret from the Stripe CLI container:
docker compose -f docker-compose-development.yml logs stripe
Look for a line like:
> Ready! Your webhook signing secret is whsec_xxxxxxxxxxxxx
Copy the whsec_xxx value and add it to your backend/.env:
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxx
.env if you restart Docker.Open a terminal in the backend folder and install npm packages:
cd backend
npm install
Generate a secure application key for encryption:
node ace generate:key
This will output a key. Copy it and add it to your .env file as APP_KEY, or the command may update it automatically.
Create the database tables:
node ace migration:run
Populate the database with your configured plans:
node ace db:seed --files "./database/seeders/plan_seeder.ts"
Run the test suite to ensure everything is configured correctly:
node ace test
If all tests pass, your backend is properly configured!
Start the AdonisJS development server:
node ace serve --watch
The backend API will be available at http://localhost:3333.
Open separate terminals for each queue worker:
Terminal 1 - User Deletions Queue:
node ace queue:listen --queue=user_deletions
Terminal 2 - Emails Queue:
node ace queue:listen --queue=emails
With the backend running, you can now set up the frontend application.
Navigate to the frontend folder and create your environment file:
cd frontend
cp .env.example .env
The .env file contains the API base URL that points to your backend:
API_BASE_URL=http://localhost:3333
Install the npm packages:
npm install
Update the plans configuration in frontend/app/types/plan.ts to match the plans you seeded in the backend.
The file contains the display information for each plan (name, description, icon, and features):
import { SparkleIcon, FlameIcon, RocketIcon } from 'lucide-vue-next';
export const PlansConfig = [
{
name: 'Pro',
key: 'pro', // Must match the key in your backend seeder
description: 'For growing businesses',
icon: FlameIcon,
features: [
'Up to 100,000 clients',
'Advanced management tools',
'Priority support',
'API access',
]
},
{
name: 'Ultimate',
key: 'ultimate', // Must match the key in your backend seeder
description: 'For large enterprises',
icon: RocketIcon,
features: [
'Unlimited clients',
'Enterprise features',
'Dedicated support',
'Custom integrations',
]
}
];
key field must exactly match the key values in your backend/database/seeders/plan_seeder.ts. This is how the frontend matches display information with plan data from the API.You can customize:
Start the Nuxt development server:
npm run dev
Open your browser and navigate to http://localhost:3000 to see the frontend application.
Here's the complete setup sequence for easy copy-pasting:
# 1. Environment setup
cd backend
cp .env.example .env
# Edit .env with your configuration
# 2. Start Docker services
cd ../etc/docker
docker compose -f docker-compose-development.yml up -d
# 3. Get webhook secret from logs and add to .env
docker compose -f docker-compose-development.yml logs stripe
# 4. Backend setup
cd ../../backend
npm install
node ace generate:key
node ace migration:run
node ace db:seed --files "./database/seeders/plan_seeder.ts"
# 5. Verify and run
node ace test
node ace serve --watch
# 6. In separate terminals, run queue workers
node ace queue:listen --queue=user_deletions
node ace queue:listen --queue=emails
# 1. Environment setup
cd frontend
cp .env.example .env
# 2. Install and run
npm install
npm run dev
# 3. Open http://localhost:3000
| Issue | Solution |
|---|---|
| Docker containers won't start | Ensure Docker Desktop is running |
| Database connection refused | Check PostgreSQL container is running: docker ps |
| Stripe webhook secret not found | Wait a few seconds for the container to initialize, then check logs again |
| Migrations fail | Verify database credentials in .env match Docker Compose settings |
| Tests fail with database errors | Ensure .env.test exists with DB_DATABASE=test |
| Emails not appearing in MailHog | Check the emails queue worker is running |
| Issue | Solution |
|---|---|
| API requests failing | Ensure backend is running on http://localhost:3333 |
| Plans not displaying correctly | Verify key values in plan.ts match your backend seeder |
| Port 3000 already in use | Stop other processes or change port with npm run dev -- --port 3001 |