https://github.com/playfulprogramming/hoof
https://github.com/playfulprogramming/hoof
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/playfulprogramming/hoof
- Owner: playfulprogramming
- Created: 2024-05-12T16:19:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-12T13:18:13.000Z (11 months ago)
- Last Synced: 2025-04-06T12:15:43.870Z (9 months ago)
- Language: Kotlin
- Size: 1.67 MB
- Stars: 5
- Watchers: 5
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hoof
"Hoof" provides the backend for Playful Programming's content management experience.
This repository houses:
- `hoof-api`: the external-facing REST API
- `hoof-worker`: a background task runner in NodeJS, for image fetching & generation
## Getting Started
Prerequisites:
- [IntelliJ IDEA](https://www.jetbrains.com/idea/)
- [Java 23](https://jdk.java.net/23/) (can also be installed via IntelliJ: File -> Project Structure -> Project -> SDK)
- [Node 20](https://nodejs.org/en/download)
- [Docker](https://www.docker.com/get-started/)
To start the postgres database:
```sh
cp .env.example .env
docker compose up --wait
```
To run the API server:
```sh
cd api
./gradlew runFlywayMigrate # runs any database migrations
./gradlew run # (or use the Run button in IntelliJ)
```
To start the worker app:
```sh
cd worker
# Set up pnpm through Corepack: https://nodejs.org/api/corepack.html
corepack enable pnpm
corepack install
corepack up
# Install dependencies & run
pnpm install
pnpm run dev
```
## Deployment
* The database schema is managed by the API, in `src/main/sqldelight/...`
* Migrations are executed by `FlywayMigrate.kt`
* When you change the schema locally, you'll need to run `./gradlew runFlywayMigrate` yourself.
* This runs automatically on deployment, as a result of fly.io's `RELEASE_COMMAND=1` configuration.
* Object Storage is hosted through [Tigris](https://www.tigrisdata.com/)
* It's a public bucket with CORS enabled, so that preview builds (on subdomains) can also use it
* This is configured in the `S3_*` environment variables