Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: moving from express/static to NuxtJS #3

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d600f16
Nuxt client (#3)
oxypomme Oct 17, 2022
318625e
fix(api): :ambulance: Fixed missing dependencies
oxypomme Oct 18, 2022
ad65c76
chore(nuxt): :arrow_up: Upgraded dependencies
oxypomme Oct 21, 2022
f2c88df
chore: :fire: Removed old web client
oxypomme Oct 21, 2022
81a0251
chore: :fire: Removed useless files
oxypomme Oct 21, 2022
e5289df
fix(nuxt): :bug: Fixed images
oxypomme Oct 22, 2022
8ba184b
feat(nuxt): :sparkles: Added container for whole layout
oxypomme Oct 22, 2022
ebb8af7
feat(nuxt): :sparkles: Added retry button on mission table
oxypomme Oct 22, 2022
102e453
fix(nuxt): :lipstick: Fixed few style issues
oxypomme Oct 22, 2022
cf6bbc8
feat(nuxt): :sparkles: Added about page
oxypomme Oct 22, 2022
efc6917
fix(nuxt): :bug: Replaced buttons by links in about
oxypomme Oct 29, 2022
fd7676a
build(nuxt): :arrow_up: upgraded dependencies
oxypomme Jan 21, 2023
4c3463f
initial commit for nuxt server (API mission/list)
Morbakos Apr 29, 2023
6c5c13f
fix(nuxt): :lock: fixed prvate env vars gooing public
oxypomme Apr 29, 2023
004adcb
docs(nuxt): :memo: added new env vars into sample-env
oxypomme Apr 29, 2023
66a2473
fix(nuxt): :bug: fixed mission table
oxypomme Apr 29, 2023
494a4d6
docs(nuxt): :wastebasket: marked as deprecated old API urls
oxypomme Apr 29, 2023
f8fd863
add back for show mission
Morbakos Apr 30, 2023
b670d7b
feat(nuxt): :lipstick: added style for mission show
oxypomme Apr 30, 2023
7ed3c87
fix(nuxt): :lipstick: fixed error page
oxypomme Apr 30, 2023
7627678
fix(nuxt): :lipstick: fixed center issue on mission show
oxypomme Apr 30, 2023
3b29d0d
fix(nuxt): :bug: fixed mission image when not loading
oxypomme Apr 30, 2023
9d779d3
build(deps): :arrow_up: upgraded dependencies
oxypomme May 4, 2023
60833f3
add check for mission upload
Morbakos May 5, 2023
537ae2f
fix(nuxt): :label: fixed typing issues
oxypomme May 5, 2023
191c0ea
fix(nuxt): :fire: removed useless doublee call to upload
oxypomme May 6, 2023
a602e9c
feat(nuxt): :zap: improvements on mission upload
oxypomme May 7, 2023
a136275
fix(nuxt): :bug: fixed repo link
oxypomme May 8, 2023
3d292ec
fix(nuxt): :bug: no longer redirect when getAccessToken fails
oxypomme May 8, 2023
0b86201
fix(nuxt): :bug: fixed minor issues with asyncFileExist
oxypomme May 8, 2023
b5c0218
Commit de parano
Morbakos May 12, 2023
f5d7875
switch to localStorage for auth0 token & reactivate auth on add page
May 15, 2023
967dcea
almost done for upload
May 15, 2023
ec11d60
Make Oxy happy for once :P
May 15, 2023
cbf2096
commit de parano
May 15, 2023
8baa590
add method to copy collection
May 16, 2023
1d802ec
Fix wrong variable in config
May 16, 2023
777f06d
finalize mission upload
May 16, 2023
ddc6fcf
Adapt mission list to old & new model for briefing
May 17, 2023
3009232
feat(nuxt): :sparkles: db client is now a singleton
oxypomme May 17, 2023
979090f
feat(nuxt): :sparkles: added compact list
oxypomme May 17, 2023
bc0ae25
perf(nuxt): :zap: better indexing in table
oxypomme May 17, 2023
eac6084
feat(nuxt): :sparkles: added filters for mission list
oxypomme May 17, 2023
036ad2e
fix(nuxt): :bug: added minimum for players filters
oxypomme May 17, 2023
ff62364
feat(nuxt): :sparkles: added fuzzy search in list
oxypomme May 17, 2023
9929965
refactor(nuxt): :recycle: refactored usage of useRuntimeConfig & AUTH…
oxypomme May 17, 2023
62cafea
build(nuxt): :wrench: now using nuxt overloading env
oxypomme May 17, 2023
ca9ac9f
fix(nuxt): :bug: fixed boolean & number filters at 0/false
oxypomme May 17, 2023
1d4e60b
fix(nuxt): :bug: minor fixs in mission list
oxypomme May 18, 2023
fcb7be3
feat(nuxt): :sparkles: using v-tooltip instead of titles
oxypomme May 18, 2023
9240da5
refactor(nuxt): :fire: removed unused component
oxypomme May 18, 2023
7f3b1fe
feat(nuxt): :sparkles: added clear on drop down filters
oxypomme May 18, 2023
9794191
Remove unused route
Morbakos May 21, 2023
8ff0e92
Add enpoint to update mission
Morbakos May 22, 2023
0f377a0
(Non-working) commit for exam
Morbakos May 27, 2023
2b90428
fix(nuxt): :bug: fixed set playable route
oxypomme May 27, 2023
28f7d8d
fix(nuxt): :passport_control: somehow fixed auth0
oxypomme Jun 4, 2023
5bed1a0
fix(nuxt): :bug: fixed mission not beign set a playable
oxypomme Jun 4, 2023
95d59b4
chore: :truck: deleted old files, moved new app, added docker
oxypomme Oct 1, 2023
1db6956
docs: :memo: fixed missing commands for dev
oxypomme Oct 1, 2023
4b1c751
chore: :technologist: updated scopes
oxypomme Oct 1, 2023
a5b7334
fix: docker config and stuff (#4)
zalexki Oct 1, 2023
9716dc3
wip
Oct 3, 2023
070fef7
finish
Oct 16, 2023
113ad1e
use lib icons
Oct 16, 2023
4a32501
add sass n cleanup
Oct 16, 2023
e0f314b
Merge pull request #5 from GdC-Framework/feat/add-darkmode
oxypomme Oct 16, 2023
1d8a682
fix: Makefile (#6)
zalexki Oct 17, 2023
989f4d0
feat: :lock: added permission check on API routes
oxypomme Dec 29, 2023
19f5d8c
docs: :memo: updated prod start documentation
oxypomme Feb 4, 2024
07f0ae5
docs: :memo: updated start documentation
oxypomme Feb 4, 2024
747faad
docs: :memo: added mising build step
oxypomme Feb 4, 2024
355dd42
build: :arrow_up: upgraded to Node20
oxypomme Feb 4, 2024
2a1ff09
chore: :hammer: switched from yarn to npm
oxypomme Feb 4, 2024
13a6b0c
build: :wrench: using process.env in config
oxypomme Feb 4, 2024
4d18753
fix(frontend): :bug: fixed logout page not found
oxypomme Feb 4, 2024
74a3802
fix(frontend): :arrow_down: downgraded primevue to a more stable version
oxypomme Feb 4, 2024
6f3b2c4
fix(frontend): :bug: fixed env vars in public config
oxypomme Feb 4, 2024
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
20 changes: 8 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
/api/node_modules
/api/package-lock.json
/api/.env
.jsdoc.conf
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
/api/public/img/brf
/web-client/node_modules
/web-client/package-lock.json
/web-client/.env
upload
.markdownlint.json
.vscode
gdc-toolbox.code-workspace
tmp
docker/
6 changes: 0 additions & 6 deletions .markdownlint.json

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
20 changes: 20 additions & 0 deletions .sample-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
NODE_ENV=production

# Server config
NITRO_PORT=3000

# Auth0 configuration
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_API_IDENTIFIER=

# DB config
MONGO_URL=
MONGO_DB_NAME=
MONGO_COLLECTION_NAME=

# Tools
PBO_MANAGER=
TEMP_DIR=
MISSIONS_DIR=
IMAGES_DIR=
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"conventionalCommits.scopes": ["backend", "frontend"]
}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20-alpine as base

ENV NODE_ENV=production

WORKDIR /app

# Install deps
COPY ./package.json ./yarn.lock ./
RUN npm ci
COPY . .

# Build
RUN npm run build

CMD node .output/server/index.mjs
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
help:
@egrep "^#" Makefile

prod:
npm run build
node .output/server/index.mjs

dev:
npm run dev

# target: docker-build|db - Start docker containers and install deps
db: docker-build
docker-build:
cp -u .sample-env .env
docker compose -f docker-compose.yml -f docker-compose.debug.yml run --rm gdctoolbox sh -c "npm run"
echo 'dont forget to update the .env file'

# target: docker-up|du - Start docker containers and run dev
du: docker-up
docker-up:
docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d

# target: prod-docker-up|pdu - Start docker containers and run prod
pdu: prod-docker-up
prod-docker-up:
docker compose -f docker-compose.yml up -d

# target: docker-down|dd - Stop docker containers
dd: docker-down
docker-down:
docker compose down
90 changes: 80 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gdc-toolbox is a set of tools for arma gamers, mission makers and community mana
* [Intented audience](#intented-audience)
* [Features](#features)
* [Installation](#installation)
* [Frenquently asked questions](#frequently-asked-questions)
* [Frequently asked questions](#frequently-asked-questions)
* [Tech notes](#tech-notes)

## Intented audience
Expand All @@ -25,7 +25,7 @@ Unless explicitly indicated, those features are provided by gdc-toolbox-api.
### Mission checking

Checks the integrity of the mission .pbo file and compliance with certain rules. Each rule can be configured as blocking if it is not satisfied :

* file naming convention : the file name should follow a defined regexp (default: true)
* pbo integrity : the file should be a real pbo and could be dpbo without any error (default: true)
* briefing.sqf : a briefing.sqf should exist in the pbo file (default: true)
Expand Down Expand Up @@ -99,7 +99,7 @@ Embed API is used, notably for discord embed

## Installation

### First installation
### Prerequisites

#### Download and install Mikero tools on your server

Expand All @@ -111,22 +111,92 @@ At least :
* DeOgg
* (maybe) DePbo

#### Download and install node

[node](https://nodejs.org/)
> [!TODO]
> add a volume or something into docker-compose.yml

#### Clone git repository

```sh
git clone <https://github.com/Tanin69/gdc-toolbox>
```

#### Define environment variables

* Copy `.sample-env` to `.env`
* Edit your configuration

### Manual

#### Download and install node

[node](https://nodejs.org/)

#### Install modules

In the server directory, run ```npm install```
```sh
npm ci
```

#### Define environment variables
### Run the server

#### With Node

```sh
npm run build
node .output/server/index.mjs
```

and use Ctrl+C to stop it

#### With PM2

> [!NOTE]
> [PM2](https://pm2.keymetrics.io) isn't included with GDCToolbox, you may want to install it with :
>
> ```sh
> npm i -g pm2
> ```

Start :

```sh
npm run build
pm2 start ecosystem.config.js
```

Restart :

```sh
pm2 restart GDCToolbox
```

Stop :

```sh
pm2 stop GDCToolbox
```

###  Docker

#### Production

```sh
docker compose up -d
```

#### Dev

```sh
nvm use 18
docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d
```

or use Makefile commands

* Copy ```.sample-env``` to ```.env```
* Edit path with your configuration
```sh
make db
make du
```

## Frequently Asked Questions

Expand Down
42 changes: 42 additions & 0 deletions README.nuxt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Nuxt 3 Minimal Starter

Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install

# pnpm
pnpm install --shamefully-hoist
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Production

Build the application for production:

```bash
npm run build
```

Locally preview production build:

```bash
npm run preview
```

Checkout the [deployment documentation](https://v3.nuxtjs.org/docs/deployment) for more information.
27 changes: 0 additions & 27 deletions api/.sample-env

This file was deleted.

25 changes: 0 additions & 25 deletions api/BACKLOG.md

This file was deleted.

Loading