- Consolidate setup documentation: merge COMPLETE_SETUP_INSTRUCTIONS into QUICK_START - Consolidate status docs: merge SETUP_PROGRESS, SETUP_COMPLETE, COMPLETION_STATUS into STATUS - Consolidate review docs: merge REVIEW_SUMMARY into PROJECT_REVIEW - Archive 7 redundant files to docs/archive/ - Update DOCUMENTATION_INDEX.md and README.md references - Create archive README explaining consolidation - Reduce root documentation from 19 to 13 files (32% reduction) - Eliminate ~400 lines of duplicate content
4.4 KiB
4.4 KiB
ASLE Quick Start Guide
Get up and running with the ASLE platform in minutes.
Prerequisites
- Node.js 20+
- Docker and Docker Compose (optional, for local services)
- PostgreSQL 15+ (or use Docker)
- Git with submodule support
Step 1: Clone Repository
# Clone with submodules (IMPORTANT!)
git clone --recurse-submodules https://github.com/Order-of-Hospitallers/asle.git
cd asle
# If you already cloned without submodules:
git submodule update --init --recursive
Step 2: Configure Database
Choose one method to set up PostgreSQL:
Option A: Docker (Recommended)
# Start PostgreSQL container
docker-compose up -d postgres
# Update backend/.env
DATABASE_URL="postgresql://asle:asle_password@localhost:5432/asle?schema=public"
Option B: Local PostgreSQL
# Create database (requires PostgreSQL admin access)
sudo -u postgres psql -c "CREATE DATABASE asle;"
# Or: createdb asle
# Update backend/.env with your connection string
DATABASE_URL="postgresql://your_user:your_password@localhost:5432/asle?schema=public"
See DATABASE_SETUP.md for detailed database configuration options.
Step 3: Backend Setup
cd backend
# Install dependencies
npm install
# Copy and configure environment
cp .env.example .env
# Edit .env with your configuration (see DATABASE_SETUP.md)
# Generate Prisma client
npm run prisma:generate
# Run database migrations
npm run prisma:migrate
# Initialize database
npm run setup:db
# Create admin user
npm run setup:admin
# Start backend (development)
npm run dev
Backend will run on http://localhost:4000
Step 4: Frontend Setup
cd ../frontend
# Install dependencies
npm install
# Copy and configure environment
cp .env.example .env.local
# Edit .env.local with your configuration
# Start frontend (development)
npm run dev
Frontend will run on http://localhost:3000
Step 5: Deploy Contracts (Optional)
cd ../contracts
# Install Foundry dependencies
forge install
# Build contracts
forge build
# Run tests
forge test
# Deploy (see DEPLOYMENT.md for details)
forge script script/Deploy.s.sol:DeployScript --rpc-url $RPC_URL --broadcast --private-key $PRIVATE_KEY
Step 6: Access the Application
- Frontend Dashboard: http://localhost:3000
- Admin Dashboard: http://localhost:3000/admin
- User DApp: http://localhost:3000/dapp
- Backend API: http://localhost:4000/api
- GraphQL Playground: http://localhost:4000/graphql
Common Issues
Submodules Not Cloned
If you see empty contracts/ or frontend/ directories:
git submodule update --init --recursive
Database Connection Error
- Verify PostgreSQL is running
- Check
DATABASE_URLinbackend/.env - Ensure database exists:
createdb asle
Port Already in Use
Change PORT in backend/.env or kill the process:
lsof -i :4000
kill -9 <PID>
Missing Dependencies
# Backend
cd backend && npm install
# Frontend
cd frontend && npm install
# Contracts
cd contracts && forge install
Next Steps
- Configure Environment: Update all
.envfiles with your API keys and configuration - Deploy Contracts: Deploy smart contracts to your target network
- Set Up KYC/AML: Configure KYC/AML provider credentials (optional)
- Configure Push Notifications: Set up push notification providers (optional)
- Review Documentation: See README.md and DEPLOYMENT.md
Development Workflow
Making Changes
- Backend Changes: Edit files in
backend/src/, changes auto-reload withnpm run dev - Frontend Changes: Edit files in
frontend/app/orfrontend/components/, changes auto-reload - Contract Changes: Edit files in
contracts/src/, runforge buildandforge test
Running Tests
# Backend tests
cd backend && npm test
# Contract tests
cd contracts && forge test
Database Migrations
cd backend
npm run prisma:migrate dev --name migration_name
Production Deployment
See DEPLOYMENT.md for detailed production deployment instructions.
Getting Help
- Documentation: See
docs/directory - API Reference: See API_DOCUMENTATION.md
- Project Structure: See PROJECT_STRUCTURE.md
- Submodules: See SUBMODULE_SETUP.md