### Install Node.js Dependencies Source: https://github.com/hunvreus/pagescms/blob/main/README.md Install all necessary project dependencies using npm after cloning the repository. ```bash npm install ``` -------------------------------- ### Start PostgreSQL Database Source: https://github.com/hunvreus/pagescms/blob/main/README.md Run a PostgreSQL database instance locally using Docker for Pages CMS. Ensure the correct user, password, and database name are used. ```bash docker run --name pagescms-db -e POSTGRES_USER=pagescms -e POSTGRES_PASSWORD=pagescms -e POSTGRES_DB=pagescms -p 5432:5432 -d postgres:16 ``` -------------------------------- ### Start Pages CMS Development Server Source: https://github.com/hunvreus/pagescms/blob/main/README.md Start the Pages CMS development server to run the application locally. ```bash npm run dev ``` -------------------------------- ### Set up GitHub App Source: https://github.com/hunvreus/pagescms/blob/main/README.md Create a GitHub App for Pages CMS local development using the provided npm script. Specify the base URL for webhooks. ```bash npm run setup:github-app -- --base-url http://localhost:3000 ``` -------------------------------- ### Configure Local Environment Variables Source: https://github.com/hunvreus/pagescms/blob/main/README.md Create a .env.local file with essential configuration variables for local development, including database connection and secrets. ```bash DATABASE_URL=postgresql://pagescms:pagescms@localhost:5432/pagescms BETTER_AUTH_SECRET=your-random-secret CRYPTO_KEY=your-random-secret ``` -------------------------------- ### Run Database Migrations Source: https://github.com/hunvreus/pagescms/blob/main/README.md Apply database migrations to set up the database schema for Pages CMS. ```bash npm run db:migrate ``` -------------------------------- ### Optional Environment Variables Source: https://github.com/hunvreus/pagescms/blob/main/README.md Configure optional environment variables for local development, such as BASE_URL and ADMIN_EMAILS. ```bash BASE_URL=https://cms.example.com ADMIN_EMAILS=admin@example.com ``` -------------------------------- ### Clone Pages CMS Repository Source: https://github.com/hunvreus/pagescms/blob/main/README.md Clone the Pages CMS repository to your local machine to begin local development. ```bash git clone https://github.com/pagescms/pagescms.git cd pagescms ``` -------------------------------- ### Generate Secrets Source: https://github.com/hunvreus/pagescms/blob/main/README.md Generate random secrets for BETTER_AUTH_SECRET and CRYPTO_KEY using OpenSSL. ```bash openssl rand -base64 32 ``` -------------------------------- ### Clear Database Cache Source: https://github.com/hunvreus/pagescms/blob/main/README.md Clear the Pages CMS database cache if it is known to be stale or corrupted. ```bash npm run db:clear-cache ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.