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

Release v1.0.0-alpha.5 #29

Merged
merged 216 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
72a9fab
update package
EliasSchaut Aug 19, 2022
54c2472
update gitignore
EliasSchaut Aug 19, 2022
f13ed89
add prisma
EliasSchaut Aug 19, 2022
5f75d6c
add user service
EliasSchaut Aug 19, 2022
712d8f3
add auth service
EliasSchaut Aug 19, 2022
ba4564f
add password encryption
EliasSchaut Aug 19, 2022
b9aa2f6
implement login route
EliasSchaut Aug 20, 2022
0056eb0
add auth guard
EliasSchaut Aug 20, 2022
cc2b968
remove test files
EliasSchaut Aug 20, 2022
3f6ce19
add dotenv package
EliasSchaut Aug 20, 2022
3e78c23
add jwt generation
EliasSchaut Aug 20, 2022
023cf70
add jwt guard with profile controller
EliasSchaut Aug 20, 2022
1e0fd22
add profile site
EliasSchaut Aug 20, 2022
0465345
improve code style with prettier
EliasSchaut Aug 23, 2022
fc2578b
remove hello worlds
EliasSchaut Aug 23, 2022
e64f267
add helmet
EliasSchaut Aug 23, 2022
66303ab
add vue framework
EliasSchaut Aug 24, 2022
b484cc5
connect vue to nest
EliasSchaut Aug 24, 2022
b6245c6
add css
EliasSchaut Aug 24, 2022
8d6688c
add login route
EliasSchaut Aug 24, 2022
52d2f46
add logger middleware + loggin route
EliasSchaut Aug 26, 2022
dd42e90
update package
EliasSchaut Sep 7, 2022
c8482a9
add catch for duplicate user registration
EliasSchaut Sep 7, 2022
55c1adb
implement submit method
EliasSchaut Sep 7, 2022
faea6e0
make login and registerView more dynamic
EliasSchaut Sep 7, 2022
1799fab
hotfix
EliasSchaut Sep 7, 2022
5688c0d
update prisma schema
EliasSchaut Sep 7, 2022
eb9f184
update structure
EliasSchaut Sep 7, 2022
0003eda
generate Movie db service
EliasSchaut Sep 7, 2022
8ba00d9
add env tmp
EliasSchaut Sep 8, 2022
75b936e
update movie relation and service
EliasSchaut Sep 8, 2022
54f881c
create movie route and add imdb package
EliasSchaut Sep 8, 2022
c3cd70a
hotfix
EliasSchaut Sep 8, 2022
c15b1e9
implement GET movie:id
EliasSchaut Oct 25, 2022
91e82a9
fix auth bugs
EliasSchaut Oct 25, 2022
93f9254
add info
EliasSchaut Oct 25, 2022
4e346de
implement POST movie
EliasSchaut Oct 25, 2022
df1d2ef
add try catch
EliasSchaut Oct 26, 2022
9dd710a
implement GET movie/all
EliasSchaut Oct 26, 2022
f646faa
implement movie table
EliasSchaut Oct 26, 2022
be9a67e
add client profile
EliasSchaut Oct 26, 2022
28aa328
client: add movie add button
EliasSchaut Oct 26, 2022
bc6ee6a
prisma: add vote table
EliasSchaut Oct 26, 2022
3fa7d53
backend: edit structure
EliasSchaut Oct 26, 2022
47f971a
backend: add vote boilerplate
EliasSchaut Oct 26, 2022
a99d510
edit structure
EliasSchaut Oct 26, 2022
0ee9446
backend: implement POST vote
EliasSchaut Oct 26, 2022
5866fec
db: improve naming
EliasSchaut Oct 30, 2022
7a0b02a
backend: add DELETE Vote
EliasSchaut Oct 30, 2022
ab59392
backend: add GET vote
EliasSchaut Oct 30, 2022
3fe67c6
update vote output
EliasSchaut Oct 30, 2022
0021879
update proposer output
EliasSchaut Oct 31, 2022
e66b89e
update package
EliasSchaut Oct 31, 2022
ce3f571
Client: implement client-side state management to react on loading an…
EliasSchaut Nov 5, 2022
1009582
client: add history view
EliasSchaut Nov 5, 2022
beeedd1
client: improve movie component table
EliasSchaut Nov 5, 2022
44356de
backend: update route GET movie/all
EliasSchaut Nov 5, 2022
71e451b
client: display movie votes
EliasSchaut Nov 5, 2022
4067357
client: implement vote
EliasSchaut Nov 6, 2022
0651c33
client: implement router logout
EliasSchaut Nov 6, 2022
5c4d11d
BD: add "name" attribute to userDB
EliasSchaut Nov 6, 2022
96c7b5b
backend: remove middleware from auth
EliasSchaut Nov 6, 2022
829a9b7
backend: implement email confirm
EliasSchaut Nov 7, 2022
03087d2
common: update env tmp
EliasSchaut Nov 7, 2022
0a655d5
client: add privacy
EliasSchaut Nov 7, 2022
f133454
client: hot fix
EliasSchaut Nov 7, 2022
d67f1af
client: hot fix
EliasSchaut Nov 7, 2022
f3d66be
client: add AlertComponent.vue
EliasSchaut Nov 7, 2022
72991b4
backend: update movie information
EliasSchaut Nov 7, 2022
6818d9a
backend: implement movie delete
EliasSchaut Nov 7, 2022
729926d
client: implement delete own movie
EliasSchaut Nov 7, 2022
fa3a79c
client: implement form validation
EliasSchaut Nov 7, 2022
4e5bb3c
common: add port configuration
EliasSchaut Nov 7, 2022
fd7eacb
client: add vertical scrolling in movie table
EliasSchaut Nov 8, 2022
d088649
client: rename page title
EliasSchaut Nov 8, 2022
3beb805
client: add regex to imdb upload
EliasSchaut Nov 8, 2022
61414cf
client: outsource api call
EliasSchaut Nov 8, 2022
3e0b5c7
client: hotfix
EliasSchaut Nov 8, 2022
79c80fb
backend: fix initial interest (now server handled instead of client h…
EliasSchaut Nov 8, 2022
c3fbdca
backend: restrict unvoting for own proposed movie
EliasSchaut Nov 8, 2022
48aa780
client: implement triggerable alert components
EliasSchaut Nov 8, 2022
375f34e
common: implemented client warnings on auth
EliasSchaut Nov 8, 2022
0b8cc26
common: implemented better version of client warnings on auth
EliasSchaut Nov 8, 2022
d51e31d
client: style hotfix
EliasSchaut Nov 8, 2022
bd03a22
common: update README.md
EliasSchaut Nov 8, 2022
9e2fd2f
Merge branch 'main' into dev
EliasSchaut Nov 8, 2022
5da7153
client: add GitHub Link
EliasSchaut Nov 8, 2022
318f01a
client: update login regex + add password confirm
EliasSchaut Nov 9, 2022
3ae6041
client: create e-mail verified page
EliasSchaut Nov 10, 2022
c011af8
client: edit plugin structure
EliasSchaut Nov 11, 2022
603bffc
client: hot fix
EliasSchaut Nov 11, 2022
fb07cdd
client: hot fix
EliasSchaut Nov 11, 2022
e93ca82
client: implement profile page style
EliasSchaut Nov 11, 2022
ae679c6
client: divide form inputs into separate components
EliasSchaut Nov 12, 2022
2082770
client: text improve
EliasSchaut Nov 12, 2022
e36040e
client: hotfix
EliasSchaut Nov 12, 2022
52bd62a
client: hotfix
EliasSchaut Nov 12, 2022
c9980d2
client: change route api/profile to api/user
EliasSchaut Nov 12, 2022
59f2559
backend: update auth (outsource password service + reduce payload to …
EliasSchaut Nov 12, 2022
1a7caff
backend: implemented user routes for self-management of own account
EliasSchaut Nov 12, 2022
afd0933
client: add profile options + implement get all user data
EliasSchaut Nov 12, 2022
3b686e7
backend: add gravatar generation
EliasSchaut Nov 13, 2022
e878732
client: add api logic to profile
EliasSchaut Nov 13, 2022
e5d60b5
backend: allow gravatar in helmet
EliasSchaut Nov 14, 2022
c20aeba
backend: implement md5 hash algorithm
EliasSchaut Nov 14, 2022
58ff96a
client: add logic to delete account
EliasSchaut Nov 14, 2022
069380e
backend: outsource gravatar in a service + update gravatar url on ema…
EliasSchaut Nov 14, 2022
3384b22
update README.md
EliasSchaut Nov 14, 2022
39a55e1
Merge branch 'main' into dev
EliasSchaut Nov 14, 2022
d5e7116
prisma: Update database model to support history and watchlist
EliasSchaut Nov 15, 2022
5d42070
backend: add event service
EliasSchaut Nov 15, 2022
b5a631f
backend: add job schedule structure
EliasSchaut Nov 15, 2022
06d54e2
backend: add db infrastructure for history and watchlist model
EliasSchaut Nov 15, 2022
9b92a40
backend: implement get_most_voted in vote db
EliasSchaut Nov 15, 2022
3f70d08
backend: add event module
EliasSchaut Nov 15, 2022
536943b
backend: implement watchlist job
EliasSchaut Nov 16, 2022
b932004
backend: implement history job
EliasSchaut Nov 16, 2022
8cc1a5a
backend: add routes GET movie/watchlist & movie/history
EliasSchaut Nov 16, 2022
b7964a1
client: movie ts folder in components folder to util folder in src + …
EliasSchaut Nov 16, 2022
2c4b968
backend: add start_time to watchlist
EliasSchaut Nov 18, 2022
c577fe5
backend: restrict deleting watchlist movies
EliasSchaut Nov 18, 2022
dab899a
client: hotfix
EliasSchaut Nov 18, 2022
c17c749
client: update favicon
EliasSchaut Nov 18, 2022
0231e77
backend: hotfix
EliasSchaut Nov 18, 2022
dcc602d
backend: update GET watchlist information
EliasSchaut Nov 18, 2022
a6f80ce
common: improve packages
EliasSchaut Nov 18, 2022
02c9a6b
client: create TableComponent to outsource tables
EliasSchaut Nov 18, 2022
00ffbc2
client: add watchlist
EliasSchaut Nov 18, 2022
1918151
client: implement history view
EliasSchaut Nov 18, 2022
ea02b1e
backend: implement GET public user information
EliasSchaut Nov 18, 2022
7f45d3b
backend: hotfix
EliasSchaut Nov 18, 2022
c5488d6
client: implement watchlist interested feature
EliasSchaut Nov 18, 2022
f74e625
client: replace bad emojis with cool svg
EliasSchaut Nov 18, 2022
023873b
client: add trash icon
EliasSchaut Nov 19, 2022
e1ff598
backend: replace node-schedule with @nest/schedule
EliasSchaut Nov 20, 2022
cdc7e7f
client: hotfix
EliasSchaut Nov 20, 2022
9be92ff
backend: restrict user deletion, when proposed video is in watchlist …
EliasSchaut Nov 20, 2022
9d29847
client: alerts now shown when adding a movie
EliasSchaut Nov 20, 2022
7c31616
client: alerts now shown when deleting a movie
EliasSchaut Nov 20, 2022
4ead28d
Merge pull request #9 from EliasSchaut/#5
EliasSchaut Nov 21, 2022
9a7e8fe
Merge branch 'main' into dev
EliasSchaut Nov 21, 2022
b475f17
Merge branch 'main' into dev
EliasSchaut Nov 21, 2022
62f195e
client: make tables responsive
EliasSchaut Nov 21, 2022
330c94b
client: hotfix
EliasSchaut Nov 21, 2022
ac0b82f
backend: hotfix password reset
EliasSchaut Nov 22, 2022
5264a4f
backend: email send now html instead of text
EliasSchaut Nov 22, 2022
ed82718
backend: add route GET auth/reset/:username to send a pw reset reques…
EliasSchaut Nov 22, 2022
f24f2ac
backend: add route POST auth/reset/:username to reset password via ch…
EliasSchaut Nov 22, 2022
94a1a08
backend: change challenge url for pw reset
EliasSchaut Nov 22, 2022
b66f1c3
client: edit structure (replace some components with views)
EliasSchaut Nov 22, 2022
096eccf
client: add ResetRequestView
EliasSchaut Nov 22, 2022
5678ed1
backend: hotfix
EliasSchaut Nov 24, 2022
0d0f616
client: create FormComponent and outsource Form from ResetViews
EliasSchaut Nov 24, 2022
217807b
client: Outsource form from Login and Register
EliasSchaut Nov 24, 2022
4565b01
client: edit component structure
EliasSchaut Nov 24, 2022
2549896
client: add router link to reset page in login view
EliasSchaut Nov 24, 2022
0a8ffec
Merge pull request #13 from EliasSchaut/#12
EliasSchaut Nov 24, 2022
3a67a16
client: remove bootstrap-table in plugins folder for now
EliasSchaut Nov 24, 2022
b912262
backend: implement discord.service for sending messages to a webhook …
EliasSchaut Nov 24, 2022
f26f70f
backend: add notify opt in value for users + logic to notify every op…
EliasSchaut Nov 24, 2022
3934a42
backend: add route POST email_opt_in
EliasSchaut Nov 24, 2022
997bddf
client: add profile option email_opt_in
EliasSchaut Nov 24, 2022
a78d9f3
backend: emails now only send via text instead of html
EliasSchaut Nov 24, 2022
487b390
Merge pull request #14 from EliasSchaut/7-the-announcement-update
EliasSchaut Nov 24, 2022
b86a36e
client: import cookie library and create cookie util
EliasSchaut Nov 25, 2022
502f8b7
client: replace localstorage with cookie
EliasSchaut Nov 25, 2022
8b2bba0
Merge pull request #17 from EliasSchaut/16-session-update
EliasSchaut Nov 25, 2022
c7548a6
Bump qs and formidable
dependabot[bot] Dec 6, 2022
8a0dfde
Merge branch 'main' into dev
EliasSchaut Dec 7, 2022
1644c56
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/qs-and-f…
EliasSchaut Dec 7, 2022
3bdf692
backend: add compodoc package + run doc script + ignore docs folder
EliasSchaut Dec 7, 2022
2c49e25
backend: implemented some params
EliasSchaut Dec 7, 2022
c75b227
types: implemented types for user controller
EliasSchaut Dec 9, 2022
7f1e046
backend: edit structure
EliasSchaut Dec 9, 2022
dc303d9
backend: add PUBLIC/PRIVATE desc in docs
EliasSchaut Dec 9, 2022
d91f60a
docs: add docs to movie controller
EliasSchaut Dec 9, 2022
6b45995
types: add MovieAll type
EliasSchaut Dec 9, 2022
9fc1a45
types: add types for movie controller
EliasSchaut Dec 9, 2022
cd83283
types: improve names
EliasSchaut Dec 9, 2022
ebce4f1
types: add types and docs for vote controller
EliasSchaut Dec 9, 2022
d42d866
backend: hotfix
EliasSchaut Dec 9, 2022
b940ae3
build: add build:all script to fully build all project components
EliasSchaut Dec 9, 2022
a60599a
build: hotfix
EliasSchaut Dec 9, 2022
5499226
build: add lots of build scripts
EliasSchaut Dec 9, 2022
b9d9ec7
common: update README.md
EliasSchaut Dec 9, 2022
1106f37
common: update README.md
EliasSchaut Dec 9, 2022
4e35ec9
client: add docs link in navbar
EliasSchaut Dec 9, 2022
97621a3
types: add types and doc to auth controller
EliasSchaut Dec 10, 2022
97230ef
common: add start:doc run script
EliasSchaut Dec 10, 2022
15903b8
common: update README.md
EliasSchaut Dec 10, 2022
c1d7d1d
common: update README.md
EliasSchaut Dec 10, 2022
dee3f39
common: edit .env.tmp file
EliasSchaut Dec 10, 2022
b780b83
common: replace dotenv package with @nestjs/config
EliasSchaut Dec 10, 2022
3209569
common: serve docs in route /docs
EliasSchaut Dec 10, 2022
77b4f99
client: add docs to navbar
EliasSchaut Dec 10, 2022
e957c18
common: rename doc scripts to docs script
EliasSchaut Dec 10, 2022
2dd42ed
backend: fix role ping bug
EliasSchaut Dec 10, 2022
8881e5e
common: edit env file
EliasSchaut Dec 10, 2022
27a2e08
common: add config schema validation
EliasSchaut Dec 10, 2022
5313c55
common: add description to config.validation.ts
EliasSchaut Dec 10, 2022
155c423
common: update README.md
EliasSchaut Dec 10, 2022
93597bc
common: hotfix package
EliasSchaut Dec 10, 2022
31308c4
Merge pull request #25 from EliasSchaut/6-the-dev-update
EliasSchaut Dec 10, 2022
c0b9eca
backend: add patterns and use them for various input validation
EliasSchaut Dec 10, 2022
62f6aa9
client: improve client patterns
EliasSchaut Dec 10, 2022
76c781a
Merge pull request #27 from EliasSchaut/19-pattern-update
EliasSchaut Dec 10, 2022
5803928
backend: close issue #11
EliasSchaut Dec 11, 2022
1dbc797
common: add env value MAX_PROPOSED_MOVIES with its functionality to r…
EliasSchaut Dec 11, 2022
8763dea
common: rename env var
EliasSchaut Dec 11, 2022
0bc1981
backend: add api documentation with swagger + update dtos to classes
EliasSchaut Dec 12, 2022
95a6dbd
backend: add route descriptions for swagger
EliasSchaut Dec 12, 2022
b4570bb
client: add doc view for the different documentations
EliasSchaut Dec 12, 2022
7ff8d62
backend: small improvements for swagger
EliasSchaut Dec 12, 2022
960f4df
update README.md
EliasSchaut Dec 12, 2022
5d004f7
Merge pull request #28 from EliasSchaut/6-the-dev-update
EliasSchaut Dec 12, 2022
f2cc47d
common: update version
EliasSchaut Dec 12, 2022
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
16 changes: 9 additions & 7 deletions .env.tmp
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ PROJECT_NAME="Movie-Monday-Manager"
FRONTEND_URL="http://localhost:3000/"
PORT="3000"

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/ID/TOKEN
DATABASE_URL="file:./dev.db"
JWT_SECRET="secret"
JWT_EXPIRATION="2h"
OMDB_API_KEY="XXXXXXXX"
MAX_VOTES="20"
MAX_PROPOSEABLE_MOVIES="5"

SCHEDULE_WATCHLIST="0 15 * * 1"
SCHEDULE_START="0 19 * * 1"
SCHEDULE_HISTORY="45 23 * * 1"
PAUSE_TIME_MIN="15"
NUM_OF_MOVIES="2"

DATABASE_URL="file:./dev.db"
JWT_SECRET="secret"
JWT_EXPIRATION="2h"
OMDB_API_KEY="XXXXXXXX"
MAX_VOTES="2"

EMAIL_HOST="smtp.example.com"
EMAIL_PORT="587"
EMAIL_HOST_USER="noreply@example.com"
EMAIL_HOST_PASSWORD="XXXXXXXXX"

DISCORD_ENABLE="false"
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/ID/TOKEN
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ lerna-debug.log*
# Prisma
/prisma/migrations
dev.db*
*.env
*.env

# Docs
/docs
69 changes: 52 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,61 @@
![](https://img.shields.io/github/license/EliasSchaut/Movie-Monday-Manager)

# Movie Monday Manager
A full stack management application for voting movies for weekly movie events.
A full stack management application for voting movies for cyclic movie events.

## Features
- Account-registration with email verification
- Users can vote, add and remove movies
- Users can manage own profile
- Clean and responsive Bootstrap-UI
- 100% useable without client (via REST-API)
- **(soon)** automatic management of voted movies around movie events
- **(soon)** automatic notifications for movie events with the list of interested users
- account-registration with email verification
- users can vote, add and remove movies
- users can manage own profile
- clean and responsive Bootstrap-UI
- 100% usable without client (via REST-API)
- automatic management of voted movies around movie events
- automatic notifications for movie events with the list of interested users

## Installation
1. You need [node.js](https://nodejs.org/en/) installed (version 18.12.1 or newer).
2. Download the [newest version](https://github.com/EliasSchaut/Movie-Monday-Managerreleases) of the code
2. Download the [newest version](https://github.com/EliasSchaut/Movie-Monday-Manager/releases) of the code
3. Rename the .env file from ```.env.tmp``` to ```.env```
4. Open the configuration file (now ```.env```) and set values.
5. In ```client``` folder: run ```npm install``` and ```npm run build```
6. In ```prisma``` folder: run prismas ```migrate``` command (e.g. ```prisma migrate dev --name init```)
7. In root folder: `npm install`.
8. Run the server with `npm start`.

## Dev-Docs & API-Docs
This documentation is still work in progress.
4. Open the configuration file (now ```.env```) and set values (see [config-section](#configuration) below).
5. Build the project with ```npm run build:all```
6. Run the server with ```npm run start:prod```

## Configuration
The configuration file is located in the root directory of the project and is called ```.env```. It will be validated on startup via the [Joi](https://joi.dev/) library. To see the validation schema, see the [config.validation.ts](./src/common/validation/config.validation.ts) file.

## API-Docs
This project is 100% usable without client via a REST-API!
The routes start with the prefix ```/api``` (e.g. `http://[::1]:3000/api`).
The api is documented with [Swagger](https://swagger.io/) at ```/docs/api``` route of the website (e.g. `http://[::1]:3000/docs/api`).

## Dev-Docs
This small guide assumes, that you have already some knowledge about node.js and the used frameworks.
The whole project is written in [Typescript](https://www.typescriptlang.org/).

### MoMoMat (Backend)
The backend uses the [NestJS](https://nestjs.com/) framework to handle the REST-API with all its corresponding services. It is also documented with [compodoc](https://compodoc.app/) at ```/docs/backend``` route of the website (e.g. `http://[::1]:3000/docs/backend`).
This project (`/src` folder) is dived into 3 main parts:
The routes (controllers) to handle incoming requests;
a common section with lots of usefully functions and classes to support the other parts;
and type definitions for internal data structures and data transmission objects (dto's).

To run the backend in development mode, you need to `npm install` the dependencies and run ```npm run start:dev``` in the root folder of the project. Note, that the client has to be built via `npm run build:client` because the client is only statically served from the `/client/dist` folder. So every change in the client has to be built to show up in the backend project. Also note, that the database should also be built (see `MoMoMat-DB` below). The backend can generate docs as static website by run `npm run build:docs` and shown by `npm run start:docs`. The backend itself can be build with `npm run build`. The build files are located in the `/dist` folder. The `npm run build:all` command can be used to build everything in with just one step.

### MoMoMat-Client (Frontend)
The frontend uses the [Vue.js](https://vuejs.org/) framework to handle the user interface.
It can be found in the `/client` folder.

The frontend uses the [Vue Router](https://router.vuejs.org/) defined in `/client/src/router` folder to handle the navigation between the different pages as singe page application.
The router shows different view components depending on the current route. These view components are defined in the `/client/src/views` folder. Some views use special components defined in the `/client/src/components` folder.

To run the client in development mode, you need to `npm install` the dependencies and run ```npm run dev``` in the `/client` folder.
But in this mode, the backend is disabled and the website cannot interact with any backend route.
To build the client for production, you need to run `npm run build` in the `/client` folder. The build files are located in the `/client/dist` folder.

### MoMoMat-DB (Database)
The database use [Prisma](https://www.prisma.io/) as ORM to handle the database connection and management.
Its database schema is defined in the ```/prisma``` folder.
Which database is used under the hood can be defined in the ```.env``` file.

The scheme can be formatted with ```npx prisma format``` in `/prisma` folder.
A database can be created via ```npx prisma migrate dev``` from `/prisma` folder or ```npm run build:db``` from root folder.
131 changes: 129 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "movie-monday-client",
"version": "0.0.0",
"version": "1.0.0-alpha.5",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
Expand All @@ -13,6 +13,7 @@
"bootstrap-table": "^1.21.1",
"jquery": "^3.6.1",
"js-cookie": "^3.0.1",
"movie-monday-manager": "file:..",
"vue": "^3.2.37",
"vue-router": "^4.1.3"
},
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/NavbarComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<li>
<router-link class="nav-link" to="/privacy">Privacy</router-link>
</li>
<li>
<router-link class="nav-link" to="/docs">Docs</router-link>
</li>
<li>
<a class="nav-link" href="https://github.com/EliasSchaut/Movie-Monday-Manager" target="_blank">GitHub</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/form/NameComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type="text"
placeholder="Max Mustermann"
name="name"
pattern="^[A-Z](.*)"
pattern="^[A-Z].{2,20}$"
:invalid_feedback="invalid_feedback"
required />
</template>
Expand All @@ -17,7 +17,7 @@ export default {
data() {
return {
label: "Name",
invalid_feedback: "Should start with a capital letter.",
invalid_feedback: "Must be between 3 and 20 characters and start with a capital letter!",
}
},
};
Expand Down
6 changes: 6 additions & 0 deletions client/src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import HistoryView from '../views/HistoryView.vue'
import PrivacyView from '../views/PrivacyView.vue'
import { store } from "@/util/store";
import { get_cookie, remove_cookie } from "@/util/cookie";
import DocsView from "@/views/DocsView.vue";

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
Expand Down Expand Up @@ -52,6 +53,11 @@ const router = createRouter({
path: '/privacy',
name: 'privacy',
component: PrivacyView
},
{
path: '/docs',
name: 'docs',
component: DocsView
}
]
})
Expand Down
28 changes: 28 additions & 0 deletions client/src/views/DocsView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<CardComponent header="Docs" id="card_docs" nobody>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="/docs/api" target="_blank">Api Docs</a>
</li>
<li class="list-group-item">
<a href="/docs/backend" target="_blank">Backend Docs</a>
</li>
</ul>
</CardComponent>
</template>

<script lang="ts">
import CardComponent from "@/components/CardComponent.vue";

export default {
name: "DocsView",
components: { CardComponent }
};
</script>

<style scoped>
#card_docs {
width: min(500px, 90vw);
margin: 20px auto
}
</style>
5 changes: 4 additions & 1 deletion nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src"
"sourceRoot": "src",
"compilerOptions": {
"plugins": ["@nestjs/swagger"]
}
}
Loading