It is now the publicly available source for folio.kendev.co, my folio website. Powered by Payload CMS 3.0 Beta .53. Includes interesting pattern for separating components into server and client components. Mail functionality still doesn't work and storage-s3 provider was working but stopped with no configuration or other changes.
Project includes smart seed function to seed the database with my data. You can change the seed data to reflect your skills and experiences etc.
To spin up the project locally, follow these steps:
-
Clone the repo:
git clone https://github.com/kendevco/foliomark4.git
-
Navigate to the project directory and copy the environment variables file:
cd foliomark4 && cp .env.example .env
-
Configure the .env file: Open the
.env
file in a text editor and add the following content:DATABASE_URI=postgres://<username>:<password>@<host>:<port>/<database> PAYLOAD_SECRET=<your_payload_secret> RESEND_API_KEY=<your_resend_api_key> EMAIL_ADDRESS_FROM=your.mail@gmail.com VAPI_PUBLIC_KEY=<your_vapi_public_key> VAPI_AGENT_ID=<your_vapi_agent_id> RESET_MEDIA_FIELDS=false PAYLOAD_PUBLIC_CLOUD_STORAGE_ADAPTER=s3 S3_BUCKET_NAME=<your_s3_bucket_name> S3_ACCESS_KEY=<your_s3_access_key> S3_SECRET_KEY=<your_s3_secret_key> S3_ENDPOINT=<your_s3_endpoint> S3_REGION=us-east-1 PAYLOAD_SEED=false
Replace the placeholder values (
<your_payload_secret>
,<your_resend_api_key>
, etc.) with your actual credentials. For more information on obtaining these keys, visit the respective vendor websites: -
Install dependencies and start the development server:
yarn && yarn dev
or
docker-compose up
(see Docker for more details)
-
Access the admin panel: Open http://localhost:3000/admin to access the admin panel and create your first admin user using the form on the page.
That's it! Changes made in ./src
will be reflected in your app.
Alternatively, you can use Docker to spin up this project locally. To do so, follow these steps:
- Follow steps 1 and 2 from above, the docker-compose file will automatically use the
.env
file in your project root. - Next run
docker-compose up
. - Follow steps 4 and 5 from above to login and create your first admin user.
That's it! The Docker instance will help you get up and running quickly while also standardizing the development environment across your teams.
To run Payload in production, you need to build and serve the Admin panel. To do so, follow these steps:
-
Build the project:
yarn build
or
npm run build
This creates a
./build
directory with a production-ready admin bundle. -
Serve the project:
yarn serve
or
npm run serve
This will run Node in production and serve Payload from the
./build
directory.
The easiest way to deploy your project is to use Payload Cloud, a one-click hosting solution to deploy production-ready instances of your Payload apps directly from your GitHub repo. You can also deploy your app manually, check out the deployment documentation for full details.
If you have any issues or questions, reach out to us on Discord or start a GitHub discussion.