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
- Clone the repository:
git clone https://github.com/sitepins/sitepins-app.git
cd sitepins-app- Install dependencies:
yarn install- Environment Setup:
Copy
.env.exampleto.envand 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
-
Create a GitHub App:
- Go to GitHub Settings > Developer settings > GitHub Apps
- Click βNew GitHub Appβ
- Configure the following:
-
Repository Permissions:
- Contents: Read & Write
- Metadata: Read
- Administration: Read & Write
- Deployments: Read
-
User Permissions:
- Email addresses: Read
-
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-versionLast updated on