Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Dec 30, 2024
1 parent 020af7f commit 06e60e4
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 24 deletions.
49 changes: 45 additions & 4 deletions backend/spring-boot/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
# API
# SpringBoot

To start the api via docker you need to run `docker-compose up --build -d`
form `backend/spring-boot`.
## Running locally (dev)

You can find the application on the following urls:
### Requirements

Before running, you'll need to have the following software installed on your machine:
- java 21
- maven
- docker
- postgres (optional)
- redis (optional)

### Running

If you don't want to install postgres and redis locally, you can just use `docker-compose-db-dev.yml` to run them via docker. To start db, just run the following:
```bash
docker-compose -f docker-compose-db-dev.yml up -d
```

After db is up, run:
```bash
mvn clean install
```

And then, you can start the API via terminal:
```bash
mvn spring-boot:run -Dspring-boot.run.profiles=dev
```

Or just use intellij. Run config for intellij is already configured, so just start the `Application` config.

## Running with docker

### Requirements

Before running, you'll need to have the following software installed on your machine:
- docker

### Running

To start the API via docker you need to run:
```bash
docker-compose -f docker-compose-api-dev.yml up --build -d
```

You can find the API on the following urls:

- api: http://localhost:8080/v1/users
- api-docs: http://localhost:8080/swagger-ui/index.html
38 changes: 18 additions & 20 deletions frontend/svelte-kit/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# create-svelte
# SvelteKit

Everything you need to build a Svelte project, powered
by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
## Running locally (dev)

## Developing
### Requirements

create `.env` file in root of svelte-kit directory with the following data:
Before running, you'll need to have the following software installed on your machine:
- node
- npm
- pnpm
- docker

### Running

The API needs to be up and running in order for the UI to function properly, and the easiest way to do it is just to run `docker-compose-api-dev.yml`. Check README.md file in `backend/spring-boot` for more info.

Once API is running, create `.env` file in root of svelte-kit directory with the following data:

```bash
# Public
Expand All @@ -15,25 +24,14 @@ PUBLIC_API_URL=http://localhost:8080/v1
JWT_SECRET=secret
```

Once you've created a project and installed dependencies with `npm install` (or `pnpm install`
or `yarn`), start a development server:
To start the app, first install dependencies with:

```bash
pnpm run dev

# or start the server and open the app in a new browser tab
pnpm run dev -- --open
pnpm install
```

## Building

To create a production version of your app:
And then run the app with:

```bash
pnpm run build
pnpm run dev
```

You can preview the production build with `pnpm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for
> your target environment.

0 comments on commit 06e60e4

Please sign in to comment.