Skip to Content
βš™οΈ Setup & Installation

Setup & Installation

Prerequisites

  • Node.js 20.x or higher
  • Yarn package manager
  • Git for version control
  • GitHub App configured for repository access
  • Paddle Account for payment processing
  • DigitalOcean Spaces for media storage

Environment Configuration

  1. Clone the repository:
git clone https://github.com/sitepins/sitepins-app.git cd sitepins-app
  1. Install dependencies:
yarn install
  1. Environment Setup: Copy .env.example to .env and configure the following variables:
# Demo Configuration NEXT_PUBLIC_IS_DEMO=false NEXT_PUBLIC_DEMO_EMAIL="" NEXT_PUBLIC_DEMO_PASSWORD="" # Backend API Configuration NEXT_PUBLIC_BACKEND_URL="https://your-backend-api.com" NEXT_PUBLIC_BEARER_TOKEN="your_backend_auth_token" # Media Storage (DigitalOcean Spaces) NEXT_PUBLIC_BUCKET_URL="https://your-space.digitaloceanspaces.com" # Payment Processing (Paddle) PADDLE_API_KEY="your_paddle_api_key" NEXT_PUBLIC_PADDLE_CLIENT_TOKEN="your_paddle_client_token" PADDLE_NOTIFICATION_WEBHOOK_SECRET="your_webhook_secret" # Analytics (PostHog) NEXT_PUBLIC_POSTHOG_KEY="your_posthog_key" # Authentication (NextAuth.js) AUTH_SECRET="your_nextauth_secret" # GitHub OAuth (User Authentication) GITHUB_CLIENT_ID="your_github_oauth_client_id" GITHUB_CLIENT_SECRET="your_github_oauth_client_secret" # Google OAuth (Optional) GOOGLE_CLIENT_ID="your_google_client_id" GOOGLE_CLIENT_SECRET="your_google_client_secret" # GitHub App (Repository Access) GITHUB_APP_ID="your_github_app_id" GITHUB_APP_CLIENT_ID="your_github_app_client_id" GITHUB_APP_CLIENT_SECRET="your_github_app_client_secret" NEXT_PUBLIC_GITHUB_APP_NAME="your_github_app_name" GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- your_private_key_content -----END RSA PRIVATE KEY-----"

GitHub App Setup

  1. Create a GitHub App:

    • Go to GitHub Settings > Developer settings > GitHub Apps
    • Click β€œNew GitHub App”
    • Configure the following:
  2. Repository Permissions:

    • Contents: Read & Write
    • Metadata: Read
    • Administration: Read & Write
    • Deployments: Read
  3. User Permissions:

    • Email addresses: Read
  4. Installation:

    • Install the app on your account or organization
    • Note the Installation ID for configuration

Development Server

# Start development server yarn dev # Build for production yarn build # Start production server yarn start # Run linting yarn lint # Format code yarn format # Update version yarn update-version
Last updated on