Development Setup
Welcome to the Peekaping development guide! Follow these steps to get your local environment up and running.
1. Clone the Repository​
git clone https://github.com/0xfurai/peekaping.git
cd peekaping
2. Install pnpm (if you don't have it)​
We use pnpm for managing JavaScript dependencies. Install it globally with npm:
npm install -g pnpm
3. Install Dependencies​
Install all project dependencies:
pnpm install
4. Node.js & Go Requirements​
- Node.js: Minimum version 18 (Download Node.js)
- Go: Minimum version 1.24 (Download Go)
Check your versions:
node -v
go version
5. Environment Variables​
Copy the example environment file and edit as needed:
cp .env.prod.example .env
# Edit .env with your preferred editor
Common variables:
DB_USER=root
DB_PASSWORD=your-secure-password
DB_NAME=peekaping
DB_HOST=localhost
DB_PORT=6001
DB_TYPE=mongo # or postgres | mysql | sqlite
SERVER_PORT=8034
CLIENT_URL="http://localhost:5173"
MODE=prod
TZ="America/New_York"
# JWT settings are now automatically managed in the database.
# Default settings are initialized on first startup:
# - Access token expiration: 15 minutes
# - Refresh token expiration: 720 hours (30 days)
# - Secret keys are automatically generated securely
6. Run a Database for Development​
You can use Docker Compose to run a local database. Example for Postgres:
docker compose -f docker-compose.postgres.yml up -d
Other options:
docker-compose.mongo.yml
for MongoDB
7. Start the Development Servers​
Run the full stack (backend, frontend, docs) in development mode:
pnpm run dev docs:watch
- The web UI will be available at http://localhost:8383
- The backend API will be at http://localhost:8034
- Api docs will be available at http://localhost:8034/swagger/index.html
- Documentation will be available athttp://localhost:3000
8. Additional Tips​
- For Go development, make sure your
GOPATH
andPATH
are set up correctly (Go install instructions).
Happy hacking! 🚀