Skip to content

Commit

Permalink
replace build/codegen scripts with justfile, adapt readme
Browse files Browse the repository at this point in the history
  • Loading branch information
GyrosOfWar committed May 31, 2024
1 parent fea39fa commit d907d63
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 65 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
A self-hostable photo gallery. Very early, very work-in-progress and not ready for use yet. Licensed under GPLv3.

## Targeted features

- Powerful user management (photos are by default private, can be shared with other users in the app, or users outside it)
- A photo feed similar to GPhotos or Apple Photos, searchable.
- Album management: Allow creating albums with images and share them with others
- Automatic tagging of images
- Easy deployment with a `docker-compose.yaml` file. (potentially also provide a Kubernetes deployment setup)

## Non-features

- Support for databases other than PostgreSQL. We use PostgreSQL specific features and support for MySQL etc. is not planned.
- Image editing support. We want to keep the scope reasonable (this is a side project).

## Developer setup
0. Prerequisites: Install Java 17+, NodeJS 18+ and PostgreSQL 15+
1. Install Typescript globally (`npm i -g typescript`)
2. Create a new database (`createdb imagehive`)
3. Set the required environment variables (`IMAGEHIVE_PG_JDBC_URL`, `IMAGEHIVE_PG_USER` and `IMAGEHIVE_PG_PASSWORD`)
4. Run the `regenerate-code` script in the main directory (`.ps1` on windows, `.sh` on *nix)
5. Install the frontend dependencies (`npm i`)
6. Start the backend (in the `backend` folder, run `./mvnw mn:run`)
7. Start the frontend (in the `frontend` folder, run `npm run dev`)

0. Prerequisites: Install Java 21, NodeJS 18+ and PostgreSQL 16 (plus `nushell` and `just` if you want to use the `justfile` shortcuts)
1. Create a new database (`createdb imagehive`)
2. Set the required environment variables (`IMAGEHIVE_PG_JDBC_URL`, `IMAGEHIVE_PG_USER` and `IMAGEHIVE_PG_PASSWORD`)
3. Run `just generate-client` and wait for it to succeed.
4. To start the different apps, do `just backend start`, `just frontend start` and `just ai start` if you have `just` and `nushell` installed, otherwise
look in the `justfile` for the respective projects to see what commands they run.
3 changes: 3 additions & 0 deletions backend/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ format:

start:
mvn compile mn:run

build:
mvn compile test-compile
12 changes: 0 additions & 12 deletions build.ps1

This file was deleted.

7 changes: 0 additions & 7 deletions build.sh

This file was deleted.

1 change: 1 addition & 0 deletions frontend/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ format:
npm run format

start:
npm install
npm run dev
12 changes: 8 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ codegen := project + "/imagehive-codegen"
cd {{codegen}}; just {{cmd}}

format:
just backend format
just frontend format
just ai format
just codegen format
just backend format
just frontend format
just ai format
just codegen format

generate-client:
rm -r imagehive-client
just backend build
npx @openapitools/openapi-generator-cli generate
20 changes: 0 additions & 20 deletions regenerate-code.ps1

This file was deleted.

14 changes: 0 additions & 14 deletions regenerate-code.sh

This file was deleted.

0 comments on commit d907d63

Please sign in to comment.