Local Setup¶
This guide covers setting up AccessALI for local development without Docker.
Prerequisites¶
- Node.js 20 LTS
- pnpm 10.10.0
- PostgreSQL 16 or Neon DB account
- Redis 7 (optional)
Installation Steps¶
1. Clone the Repository¶
2. Install Dependencies¶
3. Configure Environment¶
Copy the example environment file:
Edit .env.local with your database credentials:
# PostgreSQL connection
DATABASE_URL="postgresql://username:password@localhost:5432/accessali_dev"
# Or use Neon DB
DATABASE_URL="postgresql://user:password@ep-xxxxx.us-east-2.aws.neon.tech/accessali?sslmode=require"
# NextAuth
NEXTAUTH_SECRET="your-secret-key-min-32-characters"
NEXTAUTH_URL="http://localhost:3000"
# Redis (optional)
REDIS_URL="redis://localhost:6379"
# Mock APIs
USE_MOCK_SAP="true"
USE_MOCK_SALESFORCE="true"
USE_MOCK_SPRINGCM="true"
USE_MOCK_ELEDGER="true"
4. Create Database¶
Local PostgreSQL¶
# Create database
createdb accessali_dev
# Or using psql
psql -U postgres -c "CREATE DATABASE accessali_dev;"
Neon DB¶
- Sign up at neon.tech
- Create a new project
- Copy the connection string
- Paste into
DATABASE_URLin.env.local
5. Run Migrations¶
6. Seed Database (Optional)¶
7. Start Development Server¶
Access the application at http://localhost:3000
Development Commands¶
# Development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Type checking
pnpm type-check
# Linting
pnpm lint
# Database operations
pnpm db:migrate # Run migrations
pnpm db:seed # Seed data
pnpm db:studio # Open Prisma Studio
pnpm db:push # Push schema changes (dev only)
Troubleshooting¶
Database Connection Issues¶
# Test database connection
pnpm db:test
# Check PostgreSQL is running
pg_isready
# macOS: Start PostgreSQL
brew services start postgresql@16
# Linux: Start PostgreSQL
sudo systemctl start postgresql