Local Development Setup
This guide will help you set up a complete local development environment for the Ever Works.
Prerequisites
Ensure you have the following installed:
- Node.js 20.x or higher - Download
- Git - Download
- PostgreSQL (optional) - Download
- Docker (optional) - Download
Development Environment Setup
1. Clone and Install
# Clone the repository
git clone https://github.com/ever-co/ever-works-website-template.git
cd ever-works-website-template
# Install dependencies
npm install
# Or using yarn/pnpm
yarn install
pnpm install
2. Environment Configuration
Copy the example environment file:
cp .env.example .env.local
Configure your .env.local file:
# Basic Development Configuration
NODE_ENV=development
NEXT_PUBLIC_API_BASE_URL="http://localhost:3000/api"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# Authentication
AUTH_SECRET="generate-a-secure-secret-key"
NEXTAUTH_URL="http://localhost:3000"
# GitHub Integration (Required)
GH_TOKEN="your-github-personal-access-token"
DATA_REPOSITORY="https://github.com/your-username/awesome-data"
# Database (Optional)
DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
# OAuth Providers (Optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
3. Database Setup (Optional)
Option A: Local PostgreSQL
# Create database
createdb everworks_dev
# Run migrations
npm run db:generate
npm run db:migrate
# Seed with sample data
npm run db:seed
Option B: Docker PostgreSQL
# Start PostgreSQL container
docker run --name everworks-postgres \
-e POSTGRES_PASSWORD=your-secure-password \
-e POSTGRES_DB=your_database_name \
-p 5432:5432 \
-d postgres:15
# Run migrations
npm run db:migrate
npm run db:seed
Option C: Supabase
- Create project at Supabase
- Get connection string from Settings → Database
- Update
DATABASE_URLin.env.local - Run migrations:
npm run db:migrate
4. Content Repository Setup
Fork the Data Repository
- Visit awesome-data
- Click "Fork" to create your copy
- Update
DATA_REPOSITORYin.env.local
Generate GitHub Token
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate new token (classic)
- Select scopes:
repo,read:user,user:email - Copy the generated token and add it to
GH_TOKENin.env.local - Important: Never commit your token to version control
5. Start Development Server
npm run dev
Your application will be available at http://localhost:3000.