Getting Started
Welcome to the RK Website Core development environment! This guide will get you up and running quickly.
Prerequisites
- Git - Version control
- Docker - Container runtime
- VS Code - Code editor with Dev Containers extension
- Node.js 20+ (if developing without containers)
Quick Setup
1. Clone the Repository
bash
git clone https://github.com/rumankazi/rk-website-core.git
cd rk-website-core2. Open in Dev Container
The easiest way to get started is using VS Code Dev Containers:
- Open the project in VS Code:
code . - VS Code will prompt: "Reopen in Container" - click it
- Wait for the container to build (first time takes ~5 minutes)
- All extensions and tools will be automatically installed
3. Install Dependencies
Once inside the container:
bash
pnpm install4. Set Up Environment
Copy the environment template:
bash
cp .env.example .env.localEdit .env.local with your configuration (database URLs, API keys, etc.)
5. Database Setup
Start the PostgreSQL database:
bash
# Start database in background
docker-compose up -d postgres
# Run initial migrations
pnpm prisma migrate dev
# Generate Prisma client
pnpm prisma generate6. Start Development
bash
pnpm devYour application will be available at:
- Next.js App: http://localhost:3000
- Prisma Studio: http://localhost:5555 (run
pnpm prisma studio)
Alternative: Local Development
If you prefer developing without containers:
Requirements
- Node.js 20+
- PostgreSQL 14+
- pnpm
Setup Steps
bash
# Install pnpm globally
npm install -g pnpm
# Install dependencies
pnpm install
# Set up database (adjust connection string in .env.local)
pnpm prisma migrate dev
# Start development
pnpm devVerify Installation
Run these commands to ensure everything works:
bash
# Type checking
pnpm type-check
# Linting
pnpm lint
# Unit tests
pnpm test
# Build production bundle
pnpm buildDevelopment Tools Available
VS Code Tasks
Access via Ctrl+Shift+P → "Tasks: Run Task":
dev- Start development servertest/test:watch- Run testslint/lint:fix- Code qualitytype-check- TypeScript validationprisma:migrate- Database migrationsdocker:up/docker:down- Container management
Debugging
- F5 - Start debugging (Next.js full-stack)
- Ctrl+Shift+D - Open debug panel
- Breakpoints work in both server and client code
Database Management
bash
# Open Prisma Studio
pnpm prisma studio
# Reset database (development only!)
pnpm prisma migrate reset
# Generate client after schema changes
pnpm prisma generateProject Structure Overview
rk-website-core/
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ └── lib/ # Utilities, database, auth
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Migration history
├── tests/
│ ├── unit/ # Vitest unit tests
│ └── e2e/ # Playwright E2E tests
├── docs/ # VitePress documentation
├── .devcontainer/ # Dev container configuration
└── .vscode/ # VS Code settingsNext Steps
- Read the Development Workflow for daily development practices
- Explore Architecture Overview to understand the system design
- Check VS Code Setup for productivity tips
- Review Deployment Process for release management
Getting Help
- Architecture Questions: Check
docs/architecture/ - API Documentation: See
docs/api/ - Infrastructure: Review
docs/infrastructure/ - Issues: Create GitHub issues for bugs or feature requests
Container Benefits
The Dev Container approach ensures everyone has the exact same development environment, eliminating "works on my machine" issues and enabling instant onboarding.