Quick Start Guide
Prerequisites
- Node.js >= 18.0.0
- pnpm >= 8.0.0
- PostgreSQL database (for testing)
Installation
bash
# Clone or navigate to project
cd BosDB
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local and set:
# ENCRYPTION_MASTER_KEY=your-super-secret-key-hereDevelopment
Start test database (Docker)
bash
docker-compose up -dThis starts a PostgreSQL database with:
- Host: localhost
- Port: 5432
- Database: testdb
- Username: testuser
- Password: testpass
Run development server
bash
# Start all packages in watch mode
pnpm devThe application will be available at http://localhost:3000
Build for production
bash
# Build all packages
pnpm build
# Start production server
cd apps/web
pnpm startUsing BosDB
1. Create a Connection
- Navigate to http://localhost:3000
- Click "Get Started" or "New Connection"
- Fill in connection details:
- Name: "My Local DB"
- Type: PostgreSQL
- Host: localhost
- Port: 5432
- Database: testdb
- Username: testuser
- Password: testpass
- Click "Create Connection"
2. Execute Queries
- From dashboard, click "Open Query Editor" on your connection
- Write a SQL query:sql
SELECT * FROM information_schema.tables WHERE table_schema = 'public' LIMIT 10; - Click "Run Query"
- View results in the table below
- (Optional) Click "Export CSV" to download results
3. Explore Schema
- View available schemas in the left sidebar
- See table counts for each schema
Project Structure
text
bosdb/
├── apps/web/ # Next.js frontend
├── packages/
│ ├── core/ # Types and constants
│ ├── db-adapters/ # Database adapters
│ ├── security/ # Encryption & validation
│ └── utils/ # Logger and utilities
├── docs/ # Documentation
└── docker-compose.yml # Test databaseAvailable Scripts
bash
pnpm dev # Start development server
pnpm build # Build all packages
pnpm lint # Lint code
pnpm clean # Clean build artifactsTroubleshooting
Connection fails
- Ensure PostgreSQL is running
- Check host/port/credentials
- Verify firewall settings
Build errors
- Clear node_modules:
rm -rf node_modules && pnpm install - Clear build cache:
pnpm clean
Environment variables not working
- Ensure .env.local exists in project root
- Restart dev server after changing env vars
Next Steps
- Read ARCHITECTURE.md for system design
- Explore adding MySQL or MongoDB adapters