Official website of Pagbutlak UPV
Official website for the student and community publication of CAS in UP Visayas, Pagbutlak. It publishes articles across News, Opinion, Features, and Kultura.
- Node.js (recommended to use nvm)
- pnpm
- PostgreSQL (optional, only for local manual setup)
- Docker (optional, only for Docker setup)
- Clone the repository
cp .env.example .envto copy the example environment variables
- Create a local PostgreSQL database.
pnpm installto install dependenciespnpm devstart the dev server
-
Start the services
docker compose up
- Open http://localhost:3000 to open the app in your browser
- Go to http://localhost:3000/admin to open the admin panel
- Seed the database using one of the options below.
Seeding is destructive: it clears existing content in the seeded collections and repopulates them with demo data. Only run it against a database you're OK resetting.
- Admin UI: with the app running and an admin user logged in, click "Seed your database" on the admin dashboard.
- CLI: requires at least one existing user in the
userscollection (create one via the admin panel first).pnpm seed # or inside Docker docker compose exec payload pnpm seed
The CLI uses DATABASE_URI from your .env, so it can seed any environment you point it at.
Export the S3_* vars too if that environment serves media from S3.
| Layer | Tool | Location |
|---|---|---|
| Unit | Vitest | src/**/*.spec.ts |
| Integration | Vitest + Payload Local API | tests/int/**/*.int.spec.ts |
| E2E | Playwright | tests/e2e/**/*.e2e.spec.ts |
pnpm test # everything: unit + integration, then E2E
pnpm test:int # unit + integration only (needs a running Postgres, same DATABASE_URI as the app)
pnpm test:e2e # E2E only (needs Playwright browsers: pnpm exec playwright install chromium)Inside Docker, run integration tests with docker compose exec payload pnpm test:int.
Add unit tests next to the source as *.spec.ts, integration tests to tests/int/, and E2E tests to tests/e2e/.
Contributions are welcome!
See CONTRIBUTING.md for more information.
Distributed under the Apache License 2.0.
- Payload Website Template for bootstrapping the project