Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
564 commits
Select commit Hold shift + click to select a range
d4344f6
Decreased task switcher density
markfijneman Mar 13, 2024
0b1fb94
Update filled textbox styling
markfijneman Mar 14, 2024
5b0cd5f
Updated EditCtfDialog design
markfijneman Mar 14, 2024
cb03dfc
Updated ImportCtfDialog design
markfijneman Mar 14, 2024
3f71754
Updated InviteUserDialog design
markfijneman Mar 14, 2024
a1fc796
Updated ResetPasswordDialog design
markfijneman Mar 14, 2024
e8ce949
Updated SearchDialog design
markfijneman Mar 14, 2024
ad35de9
Resolved Vue warnings
markfijneman Mar 14, 2024
292a837
Updated TaskEditDialog design
markfijneman Mar 16, 2024
38d2073
Updated solve task dialog design
markfijneman Mar 16, 2024
c650a99
Update task and CTF deletion dialog design
markfijneman Mar 16, 2024
b4b5882
Merge pull request #81 from markfijneman/ctf-card-progressbar
JJ-8 Mar 16, 2024
5caea6d
Updated TaskExportDialog design
markfijneman Mar 16, 2024
a8449c4
Merge branch 'JJ-8:main' into navbar-redesign
markfijneman Mar 16, 2024
782f181
Formatted code
markfijneman Mar 16, 2024
d1e792e
Add delay to tooltips
markfijneman Mar 16, 2024
2d614f4
Merge branch 'JJ-8:main' into tabledense-layout
markfijneman Mar 16, 2024
d81a7aa
Formatted code
markfijneman Mar 16, 2024
7f28af0
Reduced code duplication for TaskBtnGroup component
markfijneman Mar 16, 2024
385999d
Force category tags to be in a row on TableDense layout
markfijneman Mar 16, 2024
9f11920
Merge pull request #79 from markfijneman/navbar-redesign
JJ-8 Mar 16, 2024
ebc2b56
Updated TaskImportDialog design
markfijneman Mar 16, 2024
b2ce2a8
Changed TableDense button group color scheme
markfijneman Mar 16, 2024
fffd749
Re-add category tag wrapping
markfijneman Mar 16, 2024
6bec8eb
Updated design of more dialogs
markfijneman Mar 16, 2024
8065955
Small spacing changes
markfijneman Mar 16, 2024
e75553a
Added CTFTime icon to CTFTime URL/ID input fields
markfijneman Mar 16, 2024
c779de8
Made padding more consistent
markfijneman Mar 16, 2024
585564b
Merge pull request #74 from markfijneman/tabledense-layout
JJ-8 Mar 16, 2024
0fa925c
Allow ctrl+k search dialog hotkey inside iframe
JJ-8 Mar 16, 2024
91b6d31
Merge pull request #86 from JJ-8/hotkeys-inside-iframe
JJ-8 Mar 16, 2024
3917e0f
Serve hotkeys-iframe.js from a path from Hedgedoc to circumvent CSP
JJ-8 Mar 16, 2024
5de2ad2
Merge pull request #87 from JJ-8/csp-fix-hotkey-in-iframe
JJ-8 Mar 16, 2024
96f8d3c
Merge branch 'JJ-8:main' into dialog-styling
markfijneman Mar 20, 2024
cce414a
Swap order of import dialog columns to checkbox, title, tags
markfijneman Mar 20, 2024
5fa2b8a
Align categories to the right in task import dialog
markfijneman Mar 20, 2024
ffecd9c
Add label to flag submission dialog input
markfijneman Mar 20, 2024
931f118
Replaced q-form with div in task import dialog
markfijneman Mar 20, 2024
55bfae7
Merge branch 'main' into taskswitcher-layout
markfijneman Mar 20, 2024
6712a7e
Slightly increased density of task switcher menu
markfijneman Mar 20, 2024
06c05dc
Solved wrapping in navigation bar caused by category tags
markfijneman Mar 20, 2024
bbf656d
Hide tags in task switcher on small screens
markfijneman Mar 20, 2024
6199451
Resolved UI compiler warnings for TaskImportDialog
markfijneman Mar 20, 2024
18fdcb4
Set indicator color of all tabs to secondary
markfijneman Mar 20, 2024
34d935e
Redesigned login page
markfijneman Mar 20, 2024
a61e86a
Redesigned registration page
markfijneman Mar 20, 2024
57b7138
Redesigned password reset page
markfijneman Mar 20, 2024
2d8cff9
Set static width for all auth pages
markfijneman Mar 20, 2024
ab1cfae
Make auth pages centered
markfijneman Mar 20, 2024
04d919c
Hide CTFNote logo next to auth pages on smaller screens
markfijneman Mar 20, 2024
cae8b96
Always show CTFNote text in navigation bar on login screen
markfijneman Mar 20, 2024
5370cf0
Increase page padding on auth pages
markfijneman Mar 20, 2024
13f2f4d
Display admin settings page in a single column on small screens
markfijneman Mar 21, 2024
5e4c5ce
Adjust padding of cards in registration settings
markfijneman Mar 21, 2024
1e196da
Style inputs in registration settings
markfijneman Mar 21, 2024
b54e53c
Re-organize columns on registration settings to group registration an…
markfijneman Mar 21, 2024
2932733
Hide inputs for registration and calendar passwords when disabled
markfijneman Mar 21, 2024
82c45a7
Adjust padding of cards in profile settings
markfijneman Mar 21, 2024
52f85c5
Add icon support to color picker button
markfijneman Mar 21, 2024
3ed2a6e
Style inputs in profile settings
markfijneman Mar 21, 2024
61261d9
Moved Change password to left column in profile settings
markfijneman Mar 21, 2024
582d4a4
Fix color picker button being too large in some cases
markfijneman Mar 21, 2024
64424c9
Adjust padding for theme settings
markfijneman Mar 21, 2024
db59339
Update styling for registered users settings page
markfijneman Mar 21, 2024
b4e84d2
Removed borders from cards in settings pages
markfijneman Mar 21, 2024
82976b9
Added icons to notifications toggle
markfijneman Mar 21, 2024
c6b8338
Added Discord logo to CTFNote token field
markfijneman Mar 21, 2024
d688b6e
Merge pull request #83 from markfijneman/dialog-styling
JJ-8 Mar 24, 2024
e68196f
Undo auth page centering
markfijneman Mar 24, 2024
c578a0a
Merge branch 'JJ-8:main' into auth-styling
markfijneman Mar 24, 2024
7483b5f
Make color picker icon appear white in light mode
markfijneman Mar 24, 2024
e641328
Merge branch 'JJ-8:main' into settings-styling
markfijneman Mar 24, 2024
2f7ab4a
Merge tags list and condensed tags list into a single class
markfijneman Mar 24, 2024
852efc0
Changed condensed tags list hidden count color to accent
markfijneman Mar 24, 2024
ae1bdd8
Updated task list toolbar design
markfijneman Mar 24, 2024
49791e1
Merge pull request #88 from markfijneman/taskswitcher-layout
JJ-8 Mar 24, 2024
09d8755
Removed rounded corners from CTF pages
markfijneman Mar 24, 2024
3663196
Made CTFTime link smaller
markfijneman Mar 24, 2024
13e8a23
Disabled weight badge click animation
markfijneman Mar 24, 2024
0a8b281
Adjusted spacing and layout on CTF info page
markfijneman Mar 24, 2024
80e463b
Force tags to be lowercase in the frontend during parsing
JJ-8 Mar 24, 2024
26eb22a
Merge pull request #92 from JJ-8/89-fix-tags-casing
JJ-8 Mar 24, 2024
19a99d6
Merge CTF edit and delete buttons on info page on small screens
markfijneman Mar 24, 2024
5e56f6b
Remove separator between tabs and CTF pages
markfijneman Mar 24, 2024
7144c8b
Merge branch 'JJ-8:main' into ctf-styling
markfijneman Mar 24, 2024
aa94def
Enable contextMenu by default on CTF admin menu
markfijneman Mar 24, 2024
c7b7af5
Upgrade yarn and API dependencies
JJ-8 Mar 24, 2024
d56d425
Update .prettierrc config for trailing comma
JJ-8 Mar 24, 2024
ab8bd5e
Vertically stack CTF description and credentials on small screens
markfijneman Mar 24, 2024
76b708e
Upgrade frontend dependencies
JJ-8 Mar 24, 2024
80acb3a
Format frontend files
JJ-8 Mar 24, 2024
1ad9843
Fix frontend ESLint warnings
JJ-8 Mar 24, 2024
1376c6e
Update frontend yarn cache
JJ-8 Mar 24, 2024
515f778
Merge pull request #93 from JJ-8/upgrade-dependencies-march-2024
JJ-8 Mar 24, 2024
705e7ab
Upgrade NodeJS in API and front Docker container
JJ-8 Mar 24, 2024
f8f5b94
Use alpine NodeJS docker versions
JJ-8 Mar 24, 2024
9a3678d
Fix Docker image format
JJ-8 Mar 24, 2024
2498a94
Merge pull request #94 from JJ-8/upgrade-nodejs
JJ-8 Mar 24, 2024
ec04f35
Bump @babel/traverse from 7.22.19 to 7.24.1 in /front
dependabot[bot] Mar 24, 2024
b338b8c
Update install-state.gz due to dependabot upgrade
JJ-8 Mar 24, 2024
9537bc2
Upgrade top most yarn files
JJ-8 Mar 24, 2024
93901c3
Merge pull request #95 from JJ-8/dependabot/npm_and_yarn/front/babel/…
JJ-8 Mar 24, 2024
1c7d554
Make start and end time text on CTF info page white on light mode
markfijneman Mar 24, 2024
33ef1be
Merge branch 'JJ-8:main' into auth-styling
markfijneman Mar 27, 2024
b1c5452
Increased width of auth screens to make UUID tokens fit
markfijneman Mar 27, 2024
c0f14f8
Merge branch 'JJ-8:main' into settings-styling
markfijneman Mar 27, 2024
1ca040b
Made all table headers lowercase on admin user settings page
markfijneman Mar 27, 2024
99d9dab
Moved role column in admin user settings to the left of the username …
markfijneman Mar 27, 2024
c408ec7
Prepended # to pad URL in task iframe, fixes #96
markfijneman Mar 27, 2024
8d4adcc
Merge pull request #99 from markfijneman/double-history-fix
JJ-8 Mar 27, 2024
c30d72a
Merge branch 'JJ-8:main' into ctf-styling
markfijneman Mar 27, 2024
ec5b92c
Remove newline from last paragraph in descriptions on CTF info page
markfijneman Mar 27, 2024
871a3e0
Redesigned error page for unknown task IDs
markfijneman Mar 27, 2024
818d063
Redesigned CTF guest settings page
markfijneman Mar 27, 2024
785a4be
Adjusted padding for CTF info badges
markfijneman Mar 27, 2024
95ed482
Removed description on error page for unknown task IDs
markfijneman Mar 27, 2024
ab86380
Merge pull request #90 from markfijneman/auth-styling
JJ-8 Apr 5, 2024
2636be1
Merge pull request #91 from markfijneman/settings-styling
JJ-8 Apr 5, 2024
a4370a5
Focus input before opening animation finishes in global search dialog
markfijneman Apr 11, 2024
99a9298
Focus input before opening animation finishes in solve task popup
markfijneman Apr 11, 2024
0e4f1a7
Moved edit and delete buttons next to CTF title on info page
markfijneman Apr 11, 2024
10a5dab
Fixed spacing issues below description/credentials on CTF info page
markfijneman Apr 11, 2024
aa1b1a8
Removed description from CTF guest settings
markfijneman Apr 11, 2024
55b79ce
Increased Discord event link input width
markfijneman Apr 11, 2024
0e8d793
Made full table rows clickable on past CTFs page
markfijneman Apr 11, 2024
9d5f49a
Removed padding from past CTFs card
markfijneman Apr 11, 2024
7c650a2
Made past CTFs table dense
markfijneman Apr 11, 2024
78d87c0
Increased rows per page options for past CTFs table
markfijneman Apr 11, 2024
a322cbf
Made rows per page setting for past CTFs table persistent
markfijneman Apr 11, 2024
d6b1297
Merge pull request #103 from markfijneman/dialog-responsiveness-fix
JJ-8 Apr 12, 2024
b329be5
Merge pull request #100 from markfijneman/ctf-styling
JJ-8 Apr 12, 2024
f359e69
Merge pull request #104 from markfijneman/past-ctfs-styling
JJ-8 Apr 12, 2024
56c50cf
Added custom shortcuts to HedgeDoc editor
markfijneman Apr 12, 2024
bc4a998
Merge pull request #106 from markfijneman/hedgedoc-editor-hotkeys-fix
JJ-8 Apr 15, 2024
d821f16
Hide search dialog when pressing esc
JJ-8 Apr 15, 2024
f13396c
Merge pull request #107 from JJ-8/dialog-cancel-shortcut
JJ-8 Apr 15, 2024
ac4bafb
Increased Nginx upload limit to 5MB
markfijneman Apr 15, 2024
15be314
Only allow one solve task dialog to be opened at most
markfijneman Apr 15, 2024
ac3b2cc
Set nginx upload max size in hosting instructions
JJ-8 Apr 16, 2024
a3850c2
Make max upload size a global in the inner-nginx config
JJ-8 Apr 16, 2024
5d0aac6
Merge pull request #108 from markfijneman/increase-upload-size-limit
JJ-8 Apr 16, 2024
3c60d9b
Added shortcut for opening solve task dialog
markfijneman Apr 16, 2024
5a7e05e
Added component to preview key combinations for shortcuts
markfijneman Apr 16, 2024
b0abbb1
Replace modifier keys on macOS with symbols
markfijneman Apr 16, 2024
f2c4d06
Made search dialog use ShortcutPreview component
markfijneman Apr 17, 2024
8d01d04
Made solve task dialog use custom component
markfijneman Apr 17, 2024
605a873
Renamed ShortcutPreview to ShortcutHint
markfijneman Apr 17, 2024
a201dd3
Added shortcut hint to solve task dialog when opened on task pages
markfijneman Apr 17, 2024
5b0d771
Fixed flag not updating in task solve dialog when opened using shortcut
markfijneman Apr 17, 2024
4a6f239
Merge branch 'JJ-8:main' into solve-task-shortcut
markfijneman Apr 18, 2024
065275d
Insert iframe hotkey script on task page during iframe load instead o…
markfijneman Apr 18, 2024
09b6e3f
Merge branch 'solve-task-shortcut' of github.com:markfijneman/CTFNote…
markfijneman Apr 18, 2024
fdba7e8
Remove no-backdrop-dismiss from task solve dialog
markfijneman Apr 18, 2024
1e19acf
Fix Discord event link hanging issue
JJ-8 Apr 25, 2024
97bed41
Merge pull request #111 from JJ-8/discord-event-link-sync-hang
JJ-8 Apr 25, 2024
35beb0e
Merge pull request #109 from markfijneman/solve-task-shortcut
JJ-8 Apr 25, 2024
16aae89
Set docker-compose images back to upstream
JJ-8 Apr 25, 2024
f3db7cf
Merge branch 'main' into ctfnote-v3
JJ-8 Apr 25, 2024
bebdca1
Remove accidental paste in README
JJ-8 Apr 25, 2024
43ce571
Add back manual workflow trigger
JJ-8 Apr 25, 2024
1dd1b5a
Update husky dependency
JJ-8 Apr 28, 2024
ff942e8
Update contribution guidelines and mention Discord server
JJ-8 Apr 28, 2024
885871c
Merge pull request #237 from JJ-8/ctfnote-v3
JJ-8 Apr 28, 2024
03394d6
Merge branch 'main' into ci
peace-maker Apr 29, 2024
8d3f9d9
Fix line endings
peace-maker Apr 29, 2024
4479470
Drop Node 16 test
peace-maker Apr 29, 2024
f3aa47f
Fix `any` return type of discord.js ActionRowBuilder
peace-maker Apr 29, 2024
516d4f3
Regenerate graphql bindings
peace-maker Apr 29, 2024
61ccfdd
yarn --frozen-lockfile is deprecated
peace-maker Apr 29, 2024
022992c
Fix `any` usage partly
peace-maker Apr 29, 2024
8b94a97
Run prettier on api
peace-maker Apr 29, 2024
5a1face
Upgrade used actions to use node 20
peace-maker Apr 29, 2024
bca1cb0
Bump postcss from 8.4.29 to 8.4.38 in /front
dependabot[bot] Apr 29, 2024
e899f6d
Create dependabot.yml
JJ-8 Apr 29, 2024
070e8a1
Update install-state.gz for Dependabot
JJ-8 Apr 29, 2024
8c82e08
Merge pull request #242 from TFNS/dependabot/npm_and_yarn/front/postc…
JJ-8 Apr 29, 2024
97a79ed
Merge pull request #243 from TFNS/dependabot-config
JJ-8 Apr 29, 2024
c2e0638
Merge pull request #223 from peace-maker/ci
JJ-8 Apr 29, 2024
12b6f19
Bump tar from 6.2.0 to 6.2.1 in /api
dependabot[bot] Apr 29, 2024
07606b2
Bump express from 4.19.1 to 4.19.2 in /api
dependabot[bot] Apr 29, 2024
96aa74e
Bump typescript from 5.4.3 to 5.4.5 in /api
dependabot[bot] Apr 29, 2024
7806905
Bump ip from 2.0.0 to 2.0.1 in /api
dependabot[bot] Apr 29, 2024
1944eec
Rename ECSC parser to ECSC2021
erdnaxe Jun 8, 2024
381a0ca
Add CINI parser (ECSC 2024)
erdnaxe Jun 8, 2024
62932a2
Bump braces from 3.0.2 to 3.0.3 in /api
dependabot[bot] Jun 16, 2024
edfb9e8
Bump @typescript-eslint/parser from 7.3.1 to 7.16.0 in /api
dependabot[bot] Jul 8, 2024
d6e66b4
Add base of the hitcon parser for ctfnote
daanbreur Jul 13, 2024
2be3205
import hitcon parser
daanbreur Jul 13, 2024
d869fac
Fix HITCON parser
JJ-8 Jul 14, 2024
bd64f92
Fix formatting issues in hitcon.ts
JJ-8 Jul 14, 2024
08eed9b
Merge pull request #286 from daanbreur/feat-itcon-parser
JJ-8 Jul 14, 2024
2559e9d
Merge branch 'main' into ecsc-importer
JJ-8 Jul 14, 2024
53d136a
Fix isValid of CINI parser
JJ-8 Jul 14, 2024
a7290b1
Drop ECSC2021/2022 parser
JJ-8 Jul 14, 2024
f618fa9
Merge pull request #268 from erdnaxe/ecsc-importer
JJ-8 Jul 14, 2024
7bab62c
Bump braces from 3.0.2 to 3.0.3 in /front
dependabot[bot] Jul 14, 2024
b8d049e
Merge pull request #273 from TFNS/dependabot/npm_and_yarn/front/brace…
JJ-8 Jul 14, 2024
e26663d
Merge pull request #250 from TFNS/dependabot/npm_and_yarn/api/typescr…
JJ-8 Jul 14, 2024
870323f
Merge pull request #272 from TFNS/dependabot/npm_and_yarn/api/braces-…
JJ-8 Jul 14, 2024
660cfe9
Merge pull request #246 from TFNS/dependabot/npm_and_yarn/api/tar-6.2.1
JJ-8 Jul 14, 2024
7eb7375
Merge pull request #245 from TFNS/dependabot/npm_and_yarn/api/ip-2.0.1
JJ-8 Jul 14, 2024
a8816ff
Bump tar from 6.2.0 to 6.2.1 in /front
dependabot[bot] Jul 14, 2024
5103930
Merge pull request #244 from TFNS/dependabot/npm_and_yarn/api/express…
JJ-8 Jul 14, 2024
e5a3a4a
Merge pull request #282 from TFNS/dependabot/npm_and_yarn/api/typescr…
JJ-8 Jul 14, 2024
4ec182d
Merge pull request #249 from TFNS/dependabot/npm_and_yarn/front/tar-6…
JJ-8 Jul 14, 2024
848bd34
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /front
dependabot[bot] Jul 14, 2024
f762efd
Merge pull request #248 from TFNS/dependabot/npm_and_yarn/front/webpa…
JJ-8 Jul 14, 2024
08ff6f0
Fixed .yarn exlusion rules inside of the .gitignore to make them comp…
daanbreur Jul 15, 2024
09292a5
Merge pull request #290 from daanbreur/main
JJ-8 Jul 15, 2024
ca8e60d
Created .vscode folder with config to hide yarn from search
daanbreur Jul 15, 2024
5720aa6
Merge branch 'TFNS:main' into yarn-hide-search-vscode
daanbreur Jul 15, 2024
b5384bd
Merge pull request #291 from daanbreur/yarn-hide-search-vscode
JJ-8 Jul 15, 2024
4bfce3c
Add migration for the discord_integration_enabled field in ctfnote.se…
daanbreur Jul 16, 2024
9e3834d
Add code to sync the discord use from the config to the database.
daanbreur Jul 16, 2024
15aab66
Make sure discord_integration_enabled is not null.
daanbreur Jul 16, 2024
d66de95
Maybe its a good idea to grant the correct user....
daanbreur Jul 16, 2024
5b130ce
Add checks to the pages with Discord
daanbreur Jul 17, 2024
42293af
Run codegen for graphql schema.
daanbreur Jul 17, 2024
f2d12a2
Spelling fixes.
daanbreur Jul 17, 2024
a38ddcb
Simplified v-if to v-else
daanbreur Jul 17, 2024
2832f80
GraphQL schema files fixed.
daanbreur Jul 17, 2024
88aec88
Fixes that user_admin could write to ctfnote.settings.discord_integra…
daanbreur Jul 17, 2024
6238a5d
Merge pull request #296 from daanbreur/292-discord_integration_enable…
JJ-8 Jul 18, 2024
c417c59
Bump quasar from 2.15.1 to 2.16.6 in /front
dependabot[bot] Jul 18, 2024
8ccc396
Fix Quasar build issues
JJ-8 Jul 18, 2024
87dc95e
Merge pull request #287 from TFNS/dependabot/npm_and_yarn/front/quasa…
JJ-8 Jul 18, 2024
96f5217
Create migration for account invitation with Discord link
daanbreur Jul 25, 2024
3011f16
Removes the unique constraint from discord_id in `ctfnote_private.inv…
daanbreur Jul 25, 2024
00f3b47
Update the GraphQL schema
daanbreur Jul 25, 2024
8b22bd2
Add base implementation of register command.
daanbreur Jul 25, 2024
6d44414
Add checks to make sure user only has one token.
daanbreur Jul 25, 2024
59f64ff
Add ENV vars for configuring register command.
daanbreur Jul 25, 2024
841941d
Adds checks to register command and some cleanup
daanbreur Jul 25, 2024
7a27254
Add role sync after `/register` command
JJ-8 Aug 4, 2024
192cc38
Refactor AllowedRoles to enum of strings
JJ-8 Aug 4, 2024
950afdd
Rename variables and change signature of functions
JJ-8 Aug 4, 2024
854dfcd
Move the registerWithToken role sync to the after mutation hook
JJ-8 Aug 4, 2024
640ee90
Improve Discord messages text
JJ-8 Aug 4, 2024
e7e6842
Add strict 'true' check for Discord registration
JJ-8 Aug 4, 2024
eaeaea3
Small text improvements
JJ-8 Aug 4, 2024
ee44665
Improve `/register` output even more
JJ-8 Aug 4, 2024
0644256
Add comments to sql migration file
daanbreur Aug 4, 2024
d5053c2
Rename registration logic function to match command name
daanbreur Aug 4, 2024
22cdd89
format fix
daanbreur Aug 4, 2024
7cfff57
Merge pull request #301 from daanbreur/300-account-creation-from-discord
JJ-8 Aug 10, 2024
682917f
Autofocus username field on login and registration
JJ-8 Aug 10, 2024
34bb9a5
Merge pull request #311 from TFNS/0-autofocus-login-register-fields
JJ-8 Aug 10, 2024
ff05ca6
Fix missing environment variables for Discord registration
JJ-8 Aug 10, 2024
4045522
Merge pull request #312 from TFNS/0-fix-discord-env-docker-compose
JJ-8 Aug 10, 2024
960c623
Merge branch 'test' into main
ISnackable Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 0 additions & 13 deletions .env

This file was deleted.

37 changes: 37 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Pad

# Secure: we're using HTTPS
# CMD_PROTOCOL_USESSL=true

# Domain: you need to define this if you wish to enable any options
# CMD_DOMAIN=example.org:1337

# Content-Security Policy
# CMD_CSP_ENABLE=true

# Upload on filesystem (instead of imgur)
# CMD_IMAGE_UPLOAD_TYPE=filesystem

# USE_DISCORD=false
# DISCORD_BOT_TOKEN=secret_token
# DISCORD_SERVER_ID=server_id
# DISCORD_VOICE_CHANNELS=3
# DISCORD_BOT_NAME=CTFNote

# Enable this if you want users to be able to make accounts through the /register command in discord
# DISCORD_REGISTRATION_ENABLED=false

# Which role the user should be granted on the ctfnote when creating a account through the bot
# DISCORD_REGISTRATION_CTFNOTE_ROLE=user_guest

# If you want the bot to verify if a user has a specific role in the discord before allowing them to make a account through
# the Discord command, set the ID of the role below, else leave this field empty.
#DISCORD_REGISTRATION_ROLE_ID=discord_id

# Configure timezone and locale
# TZ=Europe/Paris
# LC_ALL=en_US.UTF-8

# Can be generated with e.g. pwgen -s 64 1
# Please provide a string of length 64+ characters
# SESSION_SECRET=
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/.yarn/releases/** binary
**/.yarn/plugins/** binary
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/api"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/front"
schedule:
interval: "weekly"
1 change: 1 addition & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Build and publish Docker images to GHCR"

on:
workflow_dispatch:
push:
branches:
- "main"
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Continuous Integration

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: ctfnote
POSTGRES_USER: ctfnote
ports:
- 5432:5432

strategy:
fail-fast: false
matrix:
node: [20, 19, 18]

name: Node.js ${{ matrix.node }} build
steps:
- uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "yarn"
cache-dependency-path: |
api/yarn.lock
front/yarn.lock

- name: Build api
working-directory: ./api
run: |
yarn install --immutable --immutable-cache --check-cache
yarn build
yarn run pg-validate-migrations ./migrations

- name: Build frontend
working-directory: ./front
run: |
yarn install --immutable --immutable-cache --check-cache
yarn build

- name: Run database migrations and codegen
env:
PAD_CREATE_URL: http://hedgedoc:3000/new
PAD_SHOW_URL: /
DB_DATABASE: ctfnote
DB_ADMIN_LOGIN: ctfnote
DB_ADMIN_PASSWORD: ctfnote
DB_USER_LOGIN: user_postgraphile
DB_USER_PASSWORD: secret_password
DB_HOST: 127.0.0.1
DB_PORT: 5432
WEB_PORT: 3000
run: |
cd ./api
# create database tables first, running migrations
DB_MIGRATE_ONLY=1 yarn start
# then start the api backend server
nohup yarn start &
cd ../front
# and finally validate the generated files are up to date
bash ../api/start.sh 127.0.0.1 3000 yarn run graphql-codegen --config codegen.yml --check

lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
cache-dependency-path: |
api/yarn.lock
front/yarn.lock

- name: Install frontend dependencies
working-directory: ./front
run: yarn install --immutable --immutable-cache --check-cache

- name: Lint frontend
working-directory: ./front
run: |
yarn run eslint --ext .js,.ts,.vue,.graphql ./src
yarn run prettier --check 'src/**/*.{ts,js,vue,graphql}'

- name: Install api dependencies
working-directory: ./api
run: yarn install --immutable --immutable-cache --check-cache

- name: Lint api
working-directory: ./api
run: |
yarn run eslint --ext .ts ./src
yarn run prettier --check 'src/**/*.ts'
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,11 @@ temp/
# https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/releases
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# if you are NOT using Zero-installs, then:
# comment the following lines
!.yarn/cache

# and uncomment the following lines
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/yarn,node
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": false,
"semi": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5"
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"search.exclude": {
"**/.yarn": true,
"**/node_modules": true
}
}
Binary file not shown.
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CTFNote - Contribution Guide

When contributing to this repository, please first discuss the change you wish to make via issue with the collaborators of this repository before making a change.
We have a [Discord server](https://discord.gg/uzTybeYuBg) where we discuss the development and feature of CTFNote.

When contributing to this repository, please first discuss the change you wish to make via issue with the collaborators of this repository before making a change, or have a chat in Discord if you do not want to create a full issue yet.

## Git process

Expand Down Expand Up @@ -44,21 +46,22 @@ $ yarn
This should run the prepare script and install the linting pre-commit hooks:

```
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
$ husky install
[##] 2/2husky - Git hooks installed
✨ Done in 0.40s.
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 103ms
```

### Start the third party containers

```shell
$ docker compose \
-f docker-compose.dev.yml \
up -d hedgedoc db adminer
up -d hedgedoc db
```

### Start the API
Expand All @@ -85,8 +88,7 @@ The following endpoint are exposed and can be used in the developpement environm
- [GraphiQL](http://localhost:3000/graphiql)
- [Hedgedoc](http://localhost:3001/)
- [Quasar APP](http://localhost:8088/)
- [Adminer](http://localhost:3002/?pgsql=db&username=ctfnote&db=ctfnote)

## Review

To merge a pull request, two distinct reviews from two different collaborators are required.
To merge a pull request, a review of a maintainer is required.
Loading