Skip to content

Commit 70d4e5b

Browse files
committed
chore: prepare project for open-source release
- Rewrite README with accurate setup instructions (PostgreSQL, not MongoDB) - Fix .env.example to reflect PostgreSQL connection string - Add MIT license
1 parent e38f632 commit 70d4e5b

3 files changed

Lines changed: 78 additions & 48 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
DATABASE_URL=mongodb://127.0.0.1/your-database-name
2-
PAYLOAD_SECRET=YOUR_SECRET_HERE
1+
DATABASE_URL=postgresql://user:password@localhost:5432/training_app
2+
PAYLOAD_SECRET=your-long-random-secret-here

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Krzysztof Polak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 55 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,76 @@
1-
# Payload Blank Template
1+
# Training App
22

3-
This template comes configured with the bare minimum to get started on anything you need.
3+
A client-facing training app built with [Payload CMS](https://payloadcms.com) and Next.js. Coaches manage workout plans in the Payload admin panel; clients log their sets through a mobile-friendly web interface.
44

5-
## Quick start
5+
## Features
66

7-
This template can be deployed directly from our Cloud hosting and it will setup MongoDB and cloud S3 object storage for media.
7+
- Workout plan hierarchy: Plan → Microcycle → Workout → Exercise
8+
- Per-set logging with flexible tracking types (reps, weight, time, RIR, etc.)
9+
- Polish and English UI (next-intl)
10+
- Client authentication via Payload
811

9-
## Quick Start - local setup
12+
## Tech stack
1013

11-
To spin up this template locally, follow these steps:
14+
- **Next.js** (App Router)
15+
- **Payload CMS** — content and auth
16+
- **PostgreSQL** via `@payloadcms/db-postgres`
17+
- **Tailwind CSS**
18+
- **next-intl** — i18n (Polish / English)
1219

13-
### Clone
20+
## Getting started
1421

15-
After you click the `Deploy` button above, you'll want to have standalone copy of this repo on your machine. If you've already cloned this repo, skip to [Development](#development).
22+
### Requirements
1623

17-
### Development
24+
- Node.js 18+
25+
- PostgreSQL database
1826

19-
1. First [clone the repo](#clone) if you have not done so already
20-
2. `cd my-project && cp .env.example .env` to copy the example environment variables. You'll need to add the `MONGODB_URL` from your Cloud project to your `.env` if you want to use S3 storage and the MongoDB database that was created for you.
27+
### Setup
2128

22-
3. `pnpm install && pnpm dev` to install dependencies and start the dev server
23-
4. open `http://localhost:3000` to open the app in your browser
29+
```bash
30+
git clone https://github.com/your-username/training-app
31+
cd training-app
32+
npm install
33+
cp .env.example .env
34+
```
2435

25-
That's it! Changes made in `./src` will be reflected in your app. Follow the on-screen instructions to login and create your first admin user. Then check out [Production](#production) once you're ready to build and serve your app, and [Deployment](#deployment) when you're ready to go live.
36+
Edit `.env`:
2637

27-
#### Docker (Optional)
38+
```env
39+
DATABASE_URL=postgresql://user:password@localhost:5432/training_app
40+
PAYLOAD_SECRET=your-long-random-secret-here
41+
```
2842

29-
If you prefer to use Docker for local development instead of a local MongoDB instance, the provided docker-compose.yml file can be used.
43+
### Run
3044

31-
To do so, follow these steps:
45+
```bash
46+
npm run dev
47+
```
3248

33-
- Modify the `MONGODB_URL` in your `.env` file to `mongodb://127.0.0.1/<dbname>`
34-
- Modify the `docker-compose.yml` file's `MONGODB_URL` to match the above `<dbname>`
35-
- Run `docker-compose up` to start the database, optionally pass `-d` to run in the background.
49+
The app is available at `http://localhost:3000`.
50+
The Payload admin panel is at `http://localhost:3000/admin`.
3651

37-
## How it works
52+
### First-time setup
3853

39-
The Payload config is tailored specifically to the needs of most websites. It is pre-configured in the following ways:
54+
1. Open `/admin` and create your first user account (becomes the super-admin)
55+
2. Create a **Client** collection record for each athlete
56+
3. Build a **Plan** and assign it to the client
57+
4. The client logs in at `/` using their email and password set in the admin
4058

41-
### Collections
59+
## Project structure
4260

43-
See the [Collections](https://payloadcms.com/docs/configuration/collections) docs for details on how to extend this functionality.
61+
```
62+
src/
63+
├── app/
64+
│ ├── [locale]/(frontend)/ # Client-facing app
65+
│ └── (payload)/ # Payload admin routes
66+
├── collections/ # Payload collection configs
67+
├── i18n/ # next-intl routing and request config
68+
└── messages/ # Translation files (pl.json, en.json)
69+
messages/
70+
├── pl.json
71+
└── en.json
72+
```
4473

45-
- #### Users (Authentication)
74+
## License
4675

47-
Users are auth-enabled collections that have access to the admin panel.
48-
49-
For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
50-
51-
- #### Media
52-
53-
This is the uploads enabled collection. It features pre-configured sizes, focal point and manual resizing to help you manage your pictures.
54-
55-
### Docker
56-
57-
Alternatively, you can use [Docker](https://www.docker.com) to spin up this template locally. To do so, follow these steps:
58-
59-
1. Follow [steps 1 and 2 from above](#development), the docker-compose file will automatically use the `.env` file in your project root
60-
1. Next run `docker-compose up`
61-
1. Follow [steps 4 and 5 from above](#development) to login and create your first admin user
62-
63-
That's it! The Docker instance will help you get up and running quickly while also standardizing the development environment across your teams.
64-
65-
## Questions
66-
67-
If you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).
76+
MIT

0 commit comments

Comments
 (0)