Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

- Java 21
- Maven 3
- Node (nvm)
- Yarn
- Mailpit
- Mariadb / MySql

First install Java 21 with a package manager
and then export the correct the `JAVA_HOME`. For example, on macOS:
Expand All @@ -18,16 +22,28 @@ and then export the correct the `JAVA_HOME`. For example, on macOS:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-21.jdk/Contents/Home/
```

### [Building and running](#building-and-running)

### Database and Maipit

The `docker-compose.yaml` file in this project is meant for local development and contains a MariaDB and Mailpit instance

```shell
docker compose up -d
```

Then create the MySQL database:

```sql
DROP DATABASE IF EXISTS access;
CREATE DATABASE access CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
CREATE USER 'access'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL privileges ON `access`.* TO 'access'@'localhost';
CREATE USER 'access'@'%' IDENTIFIED BY 'secret';
GRANT ALL privileges ON `access`.* TO 'access'@'%';
```

### [Building and running](#building-and-running)
Note: in case of an error about COLLATE, omit `COLLATE utf8mb4_0900_ai_ci` from script above

### Access Server

The access server uses Spring Boot and Maven. To run locally, type:

Expand All @@ -36,11 +52,14 @@ cd server
mvn spring-boot:run
```

### Access Client

The access client uses ReactJS. To run locally, type:

```bash
cd client
nvm use
yarn install
yarn dev
```

Expand Down Expand Up @@ -84,4 +103,4 @@ yarn outdated

### [Designs](#design)

https://www.figma.com/design/81StIVqfOKfwhWVjx7Ew81/SURF-Access?node-id=1916-18441&t=gmckiSapuONmLn5u-4
https://www.figma.com/design/81StIVqfOKfwhWVjx7Ew81/SURF-Access?node-id=1916-18441&t=gmckiSapuONmLn5u-4
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
mariadb:
image: mariadb:10.11
environment:
MYSQL_ROOT_PASSWORD: secret
volumes:
- mariadb_data:/var/lib/mysql
ports:
- "3306:3306"
restart: unless-stopped
mailpit:
image: axllent/mailpit:v1.27
ports:
- "8025:8025"
- "1025:1025"
environment:
MP_UI_AUTH: "user:password"
MP_MAX_MESSAGES: 5000
restart: unless-stopped

volumes:
mariadb_data: