Skip to content

choden-dev/PrimalPrinting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

285 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlify Status

Primal Printing - Printing for everyone.

visit: (https://primalprinting.co.nz)

Getting Started

Prerequisites

Installation

pnpm install

Environment Variables

Copy the example and fill in your values:

cp .env.example .env.local   # if you have one, otherwise create .env.local

The following environment variables are required for media storage (Cloudflare R2):

Variable Description
R2_BUCKET R2 bucket name (default: primalprinting-media)
R2_S3_ENDPOINT S3-compatible endpoint: https://<ACCOUNT_ID>.r2.cloudflarestorage.com
R2_ACCESS_KEY_ID R2 API token access key ID (from Cloudflare dashboard)
R2_SECRET_ACCESS_KEY R2 API token secret access key (from Cloudflare dashboard)
R2_PUBLIC_URL Public URL for serving media (R2.dev subdomain or custom domain)

See terraform/README.md for full infrastructure setup instructions.

Infrastructure Setup (Cloudflare R2)

Media uploads are stored in a Cloudflare R2 bucket provisioned via Terraform:

cd terraform
cp terraform.tfvars.example terraform.tfvars
# Fill in cloudflare_api_token and cloudflare_account_id
terraform init
terraform plan
terraform apply

After applying, create an R2 API Token in the Cloudflare dashboard (R2 → Manage R2 API Tokens) and add the credentials to your environment variables.

Finally, enable public access on the bucket (either via the R2.dev subdomain or a custom domain) and set R2_PUBLIC_URL accordingly. See terraform/README.md for details.

Development

pnpm dev

Production Build

pnpm build
pnpm start

About

The business site for Primal Printing, providing ordering services and information. Built with Next.js, Firebase and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages