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

Dungeon Club Rewrite #26

Draft
wants to merge 206 commits into
base: rewrite
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
e64bfb4
introduce placeholder component
doodlezucc Jun 25, 2024
b99c7af
introduce pan view for board
doodlezucc Jun 25, 2024
28d50fb
clamp pan view to bounds
doodlezucc Jun 25, 2024
213cf60
clamp zoom of pan view
doodlezucc Jun 25, 2024
d25712a
clamp pan view to dimensions of child slot
doodlezucc Jun 25, 2024
9795b99
introduce tokens
doodlezucc Jun 25, 2024
b0b969a
introduce basic mongo schemas and models
doodlezucc Jun 25, 2024
c273722
pass campaign data to frontend
doodlezucc Jun 25, 2024
2e1452a
introduce message/request/response/handling functionality
doodlezucc Jun 26, 2024
0066192
introduce websocket connection
doodlezucc Jun 26, 2024
69951da
introduce bidirectional message socket
doodlezucc Jun 26, 2024
0deda02
add more typescript magic
doodlezucc Jun 26, 2024
281733f
reduce boilerplatiness when impementing sockets
doodlezucc Jun 27, 2024
878ff83
include forwarded responses in client handler
doodlezucc Jun 27, 2024
5c23cc6
separate socket logic from messages
doodlezucc Jun 27, 2024
ab23e06
introduce hydrated document typings
doodlezucc Jun 27, 2024
6ae246b
restructure lib subfolders
doodlezucc Jun 27, 2024
95a4f01
introduce login endpoint
doodlezucc Jun 27, 2024
fee2e18
move non-kit components to routes
doodlezucc Jun 27, 2024
2497e20
separate events from requests
doodlezucc Jun 27, 2024
1bd3b74
implement client message socket
doodlezucc Jun 27, 2024
f3ec2cc
introduce response error handling
doodlezucc Jun 27, 2024
626c8da
introduce global ClientSocket store for frontend
doodlezucc Jun 27, 2024
ee29ade
add validation to request handlers
doodlezucc Jun 27, 2024
267c617
add align/justify parameters to column and row
doodlezucc Jun 28, 2024
b437380
implement login form with error handling
doodlezucc Jun 28, 2024
29530f9
fade login form in and out
doodlezucc Jun 28, 2024
413dc76
introduce campaign cards
doodlezucc Jun 28, 2024
dbb05ed
improve accessibility for link buttons
doodlezucc Jun 28, 2024
ff08393
display campaigns after logging in
doodlezucc Jun 28, 2024
85135a8
introduce icon/icon button component
doodlezucc Jun 28, 2024
371f52e
introduce modal/dialog component
doodlezucc Jun 28, 2024
00485b3
bind campaign snippet name to dialog edit
doodlezucc Jun 28, 2024
01c8362
introduce error dialog
doodlezucc Jun 28, 2024
627fb8b
update campaign name from edit dialog
doodlezucc Jun 28, 2024
e651be7
implement campaign create button
doodlezucc Jun 28, 2024
92b769a
keep client session in store
doodlezucc Jun 28, 2024
b5e394d
rename scene to board
doodlezucc Jun 28, 2024
48e5f1e
introduce collection component
doodlezucc Jun 28, 2024
8428efb
include creation date in campaign schema
doodlezucc Jun 28, 2024
c379a60
move homepage-only components to separate folder
doodlezucc Jun 28, 2024
335f699
introduce snippets for campaign handler
doodlezucc Jun 29, 2024
e7e31f3
introduce prism for database interaction
doodlezucc Jun 29, 2024
9122f82
migrate to prisma
doodlezucc Jun 29, 2024
69e35f8
introduce asset manager class
doodlezucc Jun 29, 2024
27bbbd2
introduce rest endpoint handling
doodlezucc Jun 29, 2024
fa60cde
allow empty objects in typescript code
doodlezucc Jun 29, 2024
f3868e1
handle errors in rest calls
doodlezucc Jun 29, 2024
1edf596
implement REST file uploading
doodlezucc Jun 29, 2024
bd69fd8
implement get campaigns/[id] endpoint
doodlezucc Jun 29, 2024
c904a5c
add npm scripts for prisma
doodlezucc Jun 29, 2024
d672bdf
adapt websocket plugin from SvelteKit-integrated-WebSocket
doodlezucc Jun 30, 2024
d0ca275
fix vitest startup
doodlezucc Jun 30, 2024
1c8de45
migrate ws server plugin to sub-package
doodlezucc Jun 30, 2024
b687171
improve web socket package with options
doodlezucc Jun 30, 2024
8a6e488
move component kit to nested package
doodlezucc Jun 30, 2024
e5a1831
add code workspace to make working with component library easier
doodlezucc Jun 30, 2024
13705b4
move error dialog out of component library
doodlezucc Jun 30, 2024
7b11e8a
structure code workspace
doodlezucc Jun 30, 2024
7fce7be
categorize scss styling
doodlezucc Jul 1, 2024
7470a82
move SocketProvider component to client folder
doodlezucc Jul 1, 2024
e1ca160
clean up unsorted code
doodlezucc Jul 1, 2024
a9b2f04
use prisma generated types to define snippets
doodlezucc Jul 2, 2024
7d20915
add readme
doodlezucc Jul 2, 2024
ba26b0c
Merge branch 'rewrite'
doodlezucc Jul 2, 2024
52a468f
link to 1.0 branch
doodlezucc Jul 2, 2024
49cd28e
Merge branch 'rewrite' into main
doodlezucc Jul 2, 2024
a7f612f
install sub-packages on npm install
doodlezucc Jul 2, 2024
d4682eb
include selected board in campaign snippet
doodlezucc Jul 3, 2024
bf844a6
convert ws-server package to scoped library
doodlezucc Jul 3, 2024
a375b8b
use state wrappers in frontend
doodlezucc Jul 3, 2024
9913145
select board from dialog
doodlezucc Jul 3, 2024
0d814be
move component library back into main package
doodlezucc Jul 3, 2024
3d4647d
introduce file upload area
doodlezucc Jul 4, 2024
baacb5b
introduce arrangable collection component
doodlezucc Jul 4, 2024
0065ffc
remove sample asset from git
doodlezucc Jul 4, 2024
25db48b
upload image to create new boards
doodlezucc Jul 4, 2024
9918631
save uploaded assets with unique name in static directory
doodlezucc Jul 5, 2024
d740d45
use function to locate asset paths
doodlezucc Jul 5, 2024
c6e09ac
Merge branch 'file-upload'
doodlezucc Jul 5, 2024
5430488
implement default container dragging behavior in arranged collections
doodlezucc Jul 5, 2024
4f62c01
introduce dragging functionality on tokens
doodlezucc Jul 5, 2024
815c4eb
handle token dragging by transforming grid space
doodlezucc Jul 6, 2024
0b8f283
introduce square grid snapping logic
doodlezucc Jul 7, 2024
854c497
use selected grid space for token snapping
doodlezucc Jul 7, 2024
8961585
introduce undo/redo package
doodlezucc Jul 8, 2024
e8459d8
add inline syntax variant for history action
doodlezucc Jul 8, 2024
76a721e
introduce toast component
doodlezucc Jul 8, 2024
c920057
bind ctrl+z to undo
doodlezucc Jul 8, 2024
5fb50a1
display action name in undo/redo toasts
doodlezucc Jul 8, 2024
348e0a6
fix generic parameter of socket.send
doodlezucc Jul 9, 2024
8459646
remove dragend event listener on drag end
doodlezucc Jul 9, 2024
d20b68d
register token move in history
doodlezucc Jul 9, 2024
4b4e971
introduce helper function for delta undo/redo
doodlezucc Jul 9, 2024
f9bc8e4
fix websocket server on hot reloads
doodlezucc Jul 10, 2024
b2ff074
separate connection socket from user class
doodlezucc Jul 10, 2024
0d5c284
send token movement to peer players
doodlezucc Jul 10, 2024
3de94af
use stores to listen to shortcut actions
doodlezucc Jul 10, 2024
faa2cd5
disable token grid snapping when holding Alt
doodlezucc Jul 10, 2024
f1e5147
use more secure email/password serving methods
doodlezucc Jul 11, 2024
3474cba
introduce pages for registration / password reset
doodlezucc Jul 11, 2024
3090d2e
call createAccount from sign up page
doodlezucc Jul 11, 2024
a75fe9c
fix schema change related errors
doodlezucc Jul 11, 2024
8671d09
keep track of which user is on which board
doodlezucc Jul 12, 2024
200d3a2
use correct relationship in prisma schema
doodlezucc Jul 12, 2024
5b739e6
introduce SystemSetting schema model
doodlezucc Jul 13, 2024
3767e15
introduce gmail mail service
doodlezucc Jul 13, 2024
3eb9fd6
introduce mail templates
doodlezucc Jul 14, 2024
dcd8438
move email templates
doodlezucc Jul 14, 2024
6779267
introduce routes for verification links
doodlezucc Jul 14, 2024
c78be29
add Dungeon Club icon to top of emails
doodlezucc Jul 15, 2024
457f335
remove similar characters from generated codes
doodlezucc Jul 15, 2024
098eec3
separate pages/forms for reusability
doodlezucc Jul 16, 2024
1ce27af
implement input autofocus on mount
doodlezucc Jul 16, 2024
cdb1f7c
auto focus activation code input
doodlezucc Jul 16, 2024
8239da8
remember entered email address across home page
doodlezucc Jul 16, 2024
462865d
implement complete password reset flow
doodlezucc Jul 16, 2024
1cf1b62
validate password client side
doodlezucc Jul 16, 2024
f9b7616
fix async undo/redo test
doodlezucc Jul 17, 2024
5f67e04
introduce hex grid snapping
doodlezucc Jul 17, 2024
994a9dc
apply hex grid additions to token transform
doodlezucc Jul 17, 2024
99fc58a
introduce svg pattern for horizontal hex grid
doodlezucc Jul 17, 2024
665336a
draw vertical hex grid pattern
doodlezucc Jul 17, 2024
a832c04
make collection wrapper element custom
doodlezucc Jul 19, 2024
a54d602
store drag & drop order of campaigns
doodlezucc Jul 21, 2024
fcda591
delete asset files on campaign deletion
doodlezucc Jul 21, 2024
9b17560
hide irrelevant function from socket class
doodlezucc Jul 21, 2024
ec05603
display stored campaign order in frontend
doodlezucc Jul 21, 2024
60c2dd9
enable cascade deletes in database relations
doodlezucc Jul 24, 2024
0786219
introduce token palette component
doodlezucc Jul 24, 2024
8160a2c
implement creating new tokens
doodlezucc Jul 24, 2024
c64d826
fix styling specifity on anchor element buttons
doodlezucc Jul 24, 2024
583cda4
introduce "accept" and "multiple" properties on file uploader
doodlezucc Jul 24, 2024
dfc832a
restrict drag and drop file count
doodlezucc Jul 24, 2024
aabb31b
introduce tooltip component
doodlezucc Jul 25, 2024
e8f4634
improve tooltip accessibility
doodlezucc Jul 25, 2024
9517f10
fix tooltip initialization
doodlezucc Jul 25, 2024
9598d23
fix drag and drop event listener
doodlezucc Jul 25, 2024
94731db
define website as having a dark color scheme
doodlezucc Jul 25, 2024
991dddf
move list tile into separate component
doodlezucc Jul 25, 2024
d3e608e
introduce token create/delete
doodlezucc Jul 25, 2024
4d3802d
add missing client handler for tokenDelete message
doodlezucc Jul 25, 2024
cf5c83b
sustain persistent references to created tokens
doodlezucc Jul 25, 2024
1ef92ff
include multi-select token dragging
doodlezucc Aug 12, 2024
a94cf90
clear selection when loading another board
doodlezucc Aug 12, 2024
ea4c0d2
move token selection group into separate component
doodlezucc Aug 12, 2024
a4454c1
update visibleBoardId when switching boards
doodlezucc Aug 12, 2024
9ac0fd4
select token after initial placement
doodlezucc Aug 12, 2024
7025be7
clear selection when clicking non-interactable space
doodlezucc Aug 12, 2024
cc1a8fe
introduce shortcut for token deletion
doodlezucc Aug 13, 2024
14833a2
implement tokensDelete in backend
doodlezucc Aug 13, 2024
84cb390
implement undoable token deletion
doodlezucc Aug 13, 2024
d6c9217
display token avatar
doodlezucc Aug 13, 2024
18318da
only return created ID from /boards POST endpoint
doodlezucc Aug 13, 2024
11eb17b
feat: Add SMTP mailing, use env variables to configure it. Have abili…
JamesMcClelland Aug 15, 2024
7b6e13f
run prettier on mjml files
doodlezucc Aug 20, 2024
068bdc6
remove unused promise-queue.ts
doodlezucc Aug 20, 2024
1d77cb0
fix type for client to server events
doodlezucc Aug 20, 2024
dbd3f84
make token schema independent of token templates
doodlezucc Aug 23, 2024
81421eb
add event for deleting token templates
doodlezucc Aug 23, 2024
7c1440e
update campaign card after edit
doodlezucc Aug 23, 2024
a136666
avoid preventDefault() call when focusing input elements
doodlezucc Aug 23, 2024
88e095c
revert to single token creation
doodlezucc Aug 23, 2024
f86c76c
remove "reference" class (too abstract)
doodlezucc Aug 23, 2024
4f392f8
use server-side garbage approach instead of client-side references
doodlezucc Aug 23, 2024
57b76e9
move client-side token management into separate file
doodlezucc Aug 23, 2024
b47a355
use tokensRestore message when redoing a token placement action
doodlezucc Aug 23, 2024
b3ba7f7
move token movement code into token-management.ts
doodlezucc Aug 23, 2024
cb0ce6c
add undo logic for token templates
doodlezucc Aug 30, 2024
4f5f1ad
apply token template properties to inheritors in frontend on deletion
doodlezucc Aug 30, 2024
716b41f
refactor parts of token palette management into separate file
doodlezucc Sep 1, 2024
368456b
cancel token placement with escape
doodlezucc Sep 1, 2024
4c1529e
prevent token placement behind UI elements
doodlezucc Sep 1, 2024
765e460
only clear token selection if shift or ctrl isn't pressed
doodlezucc Sep 1, 2024
475b3db
fix drag handle styling on hover
doodlezucc Sep 1, 2024
182c4e2
update selected token styling
doodlezucc Sep 6, 2024
333665b
introduce token properties panel
doodlezucc Sep 6, 2024
691fb73
implement logic for shared property inheritance
doodlezucc Sep 7, 2024
8132e0c
add avatar to token properties
doodlezucc Sep 7, 2024
23cf1bc
add rest endpoint for uploading assets
doodlezucc Sep 7, 2024
b58fc9e
implement name property UI for all combinations
doodlezucc Sep 7, 2024
0be4582
generalize token/template property updating
doodlezucc Sep 7, 2024
38cf2d0
display all token properties in panel
doodlezucc Sep 8, 2024
3fc47f9
optimize remounting of token properties panel
doodlezucc Sep 8, 2024
1ecbf43
add reusable function for file POST requests
doodlezucc Sep 9, 2024
33a3e1a
store assets independent of tokens/boards
doodlezucc Sep 9, 2024
f7a0209
reflect property changes on board and token palette
doodlezucc Sep 9, 2024
9aeb1d9
implement submission of edited token properties
doodlezucc Sep 17, 2024
5990f92
implement parsing for numeric inputs
doodlezucc Sep 17, 2024
de52b71
implement client-side tokensEdit handler
doodlezucc Sep 17, 2024
7d277c6
simplify REST campaign authorization calls
doodlezucc Sep 17, 2024
5f16f05
broadcast asset creation to all players
doodlezucc Sep 17, 2024
2259b4f
work around typing error for now
doodlezucc Sep 17, 2024
e14980e
unset deleted token template on inheriting tokens
doodlezucc Sep 17, 2024
c3db602
submit edited token properties on input changes
doodlezucc Sep 17, 2024
bd722e4
broadcast REST token template creation
doodlezucc Sep 17, 2024
78ebcf7
fix token movement submission
doodlezucc Sep 17, 2024
a5195a7
update session host when re-joining as owner
doodlezucc Sep 17, 2024
2494a4f
Merge pull request #3 from JamesMcClelland/smtp-mailer
doodlezucc Sep 19, 2024
fddc7f8
refactor SMTP and Gmail services to extend common base class
doodlezucc Sep 19, 2024
b3a2195
use $env/dynamic for optional environment variables
doodlezucc Sep 19, 2024
00f3676
move mail service type parsing to MailService class
doodlezucc Sep 19, 2024
93c6029
flip pan view "click" event detection boolean
doodlezucc Sep 19, 2024
9912004
Merge pull request #4 from dungeonclub/migration/token-properties
doodlezucc Sep 19, 2024
1ba2920
Merge branch 'main' into feature/mail-service-smtp
doodlezucc Sep 19, 2024
3357674
fix circular dependencies
doodlezucc Sep 19, 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
26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
DATABASE_URL="postgres://postgres:postgres@localhost:5432/dungeonclub"

MAIL_SERVICE_SENDER_NAME="Dungeon Club"
MAIL_SERVICE_SENDER_EMAIL="[email protected]"


# GMAIL CONFIGURATION
# Uncomment and fill in the following lines to enable Gmail for email transport.
# See https://console.cloud.google.com/flows/enableapi?apiid=gmail.googleapis.com
#
# MAIL_SERVICE="gmail"
# GMAIL_API_USER="[email protected]"
# GMAIL_API_CLIENT_ID=""
# GMAIL_API_CLIENT_SECRET=""
# GMAIL_API_REFRESH_TOKEN=""


# SMTP CONFIGURATION
# Uncomment and fill in the following lines to enable SMTP for email transport.
#
# MAIL_SERVICE="smtp"
# SMTP_HOST="smtp.example.com"
# SMTP_PORT=587
# SMTP_SECURE=false
# SMTP_USER="[email protected]"
# SMTP_PASS="your_strong_password_here"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
static/user-media

# Output
.output
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ This branch contains a completely separate commit history from the master branch

A rewrite from scratch is currently in development (let's call it more of an experiment for now).
It's based on a different programming language and a different framework, so basically none of the existing git history is relevant to the rewrite.

The original Dungeon Club branch can currently be found at [doodlezucc/dungeonclub:master](https://github.com/doodlezucc/dungeonclub/tree/master).
33 changes: 33 additions & 0 deletions dungeonclub.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"folders": [
{
"name": "database",
"path": "prisma"
},
{
"name": "lib",
"path": "src/lib/logic"
},
{
"name": "routes",
"path": "src/routes"
},
{
"name": "style",
"path": "src/styles"
},
{
"name": "components",
"path": "src/lib/components"
},
{
"name": "packages",
"path": "src/lib/packages"
},
{
"name": "<root>",
"path": "."
}
],
"settings": {}
}
9 changes: 7 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
Expand All @@ -29,5 +29,10 @@ export default [
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
},
{
rules: {
'@typescript-eslint/no-empty-object-type': 'off'
}
}
];
Loading