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: proof of concept #3

Draft
wants to merge 115 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
3222228
feat: ✨ setup and theme
MinhxNguyen7 Nov 25, 2023
7d6fb0a
fix: 🐛 import errors in postcss.config
MinhxNguyen7 Nov 25, 2023
10b42fc
fix: 🐛 use esm export in postcss config
ecxyzzy Nov 25, 2023
f09f20c
chore: 🔧 remove test directory
ap0nia Nov 26, 2023
ca7143a
chore: 🔧 remove playwright config
ap0nia Nov 26, 2023
f0847c4
style: 🎨 cleanup tailwind config
ap0nia Nov 26, 2023
d80e309
chore: 🔧 cleanup package.lock dependencies
ap0nia Nov 26, 2023
1a4b371
chore: 🔧 use prettier config esm
ap0nia Nov 26, 2023
64fc25e
chore: 🔧 remove sst config
ap0nia Nov 26, 2023
12491c6
feat: ✨ move commitlint to esm
ap0nia Nov 26, 2023
c9ac6ab
chore: 🔧 move theme to src
ap0nia Nov 26, 2023
14ca29b
chore: 🔧 move vite config to js
ap0nia Nov 26, 2023
3c55b30
feat: ✨ fully type-checked postcss config
ap0nia Nov 26, 2023
6134023
chore: 🔧 totally reset eslint and enhanced ignore files
ap0nia Nov 26, 2023
2f2a3ff
chore: 🔧 update lock file and prisma schema
ap0nia Nov 26, 2023
5a81491
feat: ✨ sqlite db for simple mvp
ap0nia Nov 26, 2023
f9faac1
feat: ✨ installed eslint and use vite@4
ap0nia Nov 26, 2023
7af16fd
feat: ✨ super decked out eslint flag config
ap0nia Nov 26, 2023
ec67f8c
chore: 🔧 update package lock and dependencies
ap0nia Nov 26, 2023
9856d05
chore: 🔧 remove app.d.ts for now
ap0nia Nov 26, 2023
c423f44
chore: 🔧 remove random test file
ap0nia Nov 26, 2023
8024dee
chore: 🔧 remove sst-env
ap0nia Nov 26, 2023
51f9af2
chore: 🔧 remove lib
ap0nia Nov 26, 2023
5b86f74
chore: 🔧 remove app postcss file for now
ap0nia Nov 26, 2023
2eaa756
chore: 🔧 simplify layout for now
ap0nia Nov 26, 2023
91c2b95
chore: 🔧 simplify home page
ap0nia Nov 26, 2023
31f3286
chore: 🔧 ran formatter
ap0nia Nov 26, 2023
b9d7d8e
feat: ✨ use my prettier config
ap0nia Nov 26, 2023
6ecd312
chore: 🔧 run formatter on everything
ap0nia Nov 26, 2023
0697328
feat: ✨ minimum working skeleton ui demo
ap0nia Nov 26, 2023
fcb57d6
feat: ✨ perfect calendar event management
ap0nia Nov 26, 2023
22b1300
refactor: ♻️ move calendar handlers to separate file
ap0nia Nov 26, 2023
9d7d9e0
fix: 🐛 date overlap
ap0nia Nov 26, 2023
cb2bb69
test: 🚨 full test coverage on calendar
ap0nia Nov 26, 2023
2c13f20
test: 🚨 truly full coverage over calendar
ap0nia Nov 26, 2023
f04117c
feat: ✨ tailwind forms
ap0nia Nov 26, 2023
81e4d0c
feat: ✨ styled the calendar
ap0nia Nov 26, 2023
194e2e0
feat: ✨ hooked up event listeners demo
ap0nia Nov 26, 2023
8a80ad7
feat: ✨ state management based on hovering
ap0nia Nov 26, 2023
8102851
feat: ✨ placeholder data
ap0nia Nov 26, 2023
e213a00
feat: ✨ trpc + svelte-query
ap0nia Nov 27, 2023
618180d
feat: ✨ router for csl and science library data
ap0nia Nov 27, 2023
4ad2c69
feat: ✨ example of csl data display
ap0nia Nov 27, 2023
2120887
feat: ✨ csl data visualizer page
ap0nia Nov 27, 2023
f95ad89
perf: ⚡️ prefetch csl data
ap0nia Nov 27, 2023
f98bf61
feat: ✨ display science library data
ap0nia Nov 27, 2023
c245876
feat: ✨ mvp for displayin csl availability
ap0nia Nov 27, 2023
fef1c95
feat: ✨ auth
ap0nia Nov 27, 2023
16f1d67
style: 🎨 cleaned up hooks file
ap0nia Nov 27, 2023
1c0547a
style: 🎨 clean up app.html
ap0nia Nov 27, 2023
fdc96fd
feat: ✨ app skeleton
ap0nia Nov 27, 2023
7b8c19d
feat: ✨ icons
ap0nia Nov 27, 2023
985c72d
feat: ✨ icons in vite config
ap0nia Nov 27, 2023
1640e4e
test: 🚨 try out different theme for now
ap0nia Nov 27, 2023
ce9a596
chore: 🔧 remove store triggers
ap0nia Nov 27, 2023
a2a82e0
feat: ✨ cleaned up home page and layout
ap0nia Nov 27, 2023
275788d
feat: ✨ nicer home page with card as "hero"
ap0nia Nov 27, 2023
c82bbda
feat: ✨ mvp header
ap0nia Nov 27, 2023
677086e
chore: 🔧 ignore db
ap0nia Nov 27, 2023
9111ede
feat: ✨ udpated auth version
ap0nia Nov 27, 2023
be727f4
feat: ✨ working auth
ap0nia Nov 27, 2023
cf49ab7
style: 🎨 landing page
ap0nia Nov 27, 2023
d53506f
feat: ✨ proof of concept calendar id route
ap0nia Nov 27, 2023
681cd88
refactor: ♻️ move calendar route to reservation route
ap0nia Nov 27, 2023
a816406
chore: 🔧 remove prefetching example from home page
ap0nia Nov 27, 2023
427d0b8
feat: ✨ reservation example
ap0nia Nov 27, 2023
911d043
feat: ✨ half decent header
ap0nia Nov 27, 2023
9183f89
feat: ✨ mostly functional header
ap0nia Nov 27, 2023
e7fbee0
feat: ✨ csl router
ap0nia Nov 27, 2023
060fcbb
refactor: ♻️ combine routers
ap0nia Nov 27, 2023
04f9451
feat: ✨ new models for prisma and examples of consumption
ap0nia Nov 27, 2023
5f3abe5
feat: ✨ merge the reservations router
ap0nia Nov 27, 2023
aa75aa2
feat: ✨ reservation creation route
ap0nia Nov 27, 2023
be2a639
feat: ✨ add reservation
ap0nia Nov 27, 2023
ca6c3f2
refactor: ♻️ prisma schema to allow arbitrary user ids
ap0nia Nov 27, 2023
42e13c4
feat: ✨ update timeslots
ap0nia Nov 27, 2023
30d10d0
fix: 🐛 prisma transaction eslint conflict
ap0nia Nov 27, 2023
76cc4ad
feat: ✨ reservation id loading
ap0nia Nov 27, 2023
2a7e801
feat: ✨ can make reservation
ap0nia Nov 27, 2023
f40d30d
feat: ✨ mutations and reservation working
ap0nia Nov 27, 2023
d2743d6
refactor: ♻️ move calendar to component
ap0nia Nov 27, 2023
c71e1da
feat: ✨ mvp for calendar selection
ap0nia Nov 27, 2023
2a42db5
chore: 🔧 refactor prisma schema
ap0nia Nov 27, 2023
4044d46
chore: 🔧 restored foreign key constraint
ap0nia Nov 27, 2023
d41f8bb
revert: ⏪️ remove foreign for user and reservation
ap0nia Nov 27, 2023
34c3b89
feat: ✨ mvp header navlinks
ap0nia Nov 27, 2023
d643c6d
feat: ✨ mdsvex for rendering markdown files as components
ap0nia Nov 27, 2023
801cdea
feat: ✨ about route and proper prose invert colors
ap0nia Nov 27, 2023
89905ff
refactor: ♻️ rename timeslot to timeslots
ap0nia Nov 27, 2023
1d1ec8a
feat: ✨ works
ap0nia Nov 27, 2023
e71f4b9
feat: ✨ slider calendar time range
ap0nia Nov 27, 2023
438c553
feat: ✨ ability to create anonymous timeslots
ap0nia Nov 27, 2023
989811a
style: 🎨 cleaned up calendar
ap0nia Nov 27, 2023
e1389b1
feat: ✨ delete button
ap0nia Nov 27, 2023
4ced64e
chore: 🔧 remove commented code
ap0nia Nov 27, 2023
97ea96b
feat: ✨ delete button
ap0nia Nov 27, 2023
ebeee3b
feat: ✨ derived stores
ap0nia Nov 27, 2023
baf0fa2
feat: ✨ it works
ap0nia Nov 27, 2023
1404875
feat: ✨ error
ap0nia Nov 27, 2023
5933ecf
fix: 🐛 error from sveltekit
ap0nia Nov 27, 2023
ee52c52
feat: ✨ cleaned up home page
ap0nia Nov 27, 2023
8142935
feat: ✨ profiles page with endpoint
ap0nia Nov 27, 2023
883bc3b
feat: ✨ basic profile functionality
ap0nia Nov 27, 2023
eb0f2d9
fix: 🐛 bad logic for updating user timeslots
ap0nia Nov 27, 2023
181cf27
chore: 🔧 clean up routes, add dedicated developer debugging endpoint
ap0nia Nov 27, 2023
e7a6bdb
feat: ✨ developer landing page
ap0nia Nov 27, 2023
a284bac
feat: ✨ select csl room
ap0nia Nov 27, 2023
b5a4ece
refactor: ♻️ cleaned up stuff
ap0nia Nov 27, 2023
e1be9a4
feat: ✨ cdk setup working
ap0nia Nov 28, 2023
543be29
feat: ✨ cdk deploy / destroy commands
ap0nia Nov 28, 2023
c387604
feat: ✨ working with devops
ap0nia Nov 28, 2023
5ac906f
fix: 🐛 try uploading prisma
ap0nia Nov 28, 2023
f413ef2
feat: ✨ try using postgress vercel
ap0nia Nov 28, 2023
cb4d9fb
revert: ⏪️ use sqlite for easier dev
ap0nia Nov 28, 2023
2121d52
fix: 🐛 tsconfig
ap0nia Nov 28, 2023
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
36 changes: 25 additions & 11 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
#####################################################################################
# Generated
#####################################################################################

## Packages installed by NPM. https://docs.npmjs.com/about-packages-and-modules
node_modules/

## Vitest coverage output. https://vitest.dev/guide/coverage.html
coverage/

## Build outputs.

### SvelteKit outputs.
.svelte-kit/
build/

### tsc out directory, specified in tsconfig.json .
dist/

#####################################################################################
# Development
#####################################################################################

### Lock files for NPM, Yarn, and PNPM respectively.
package-lock.json
yarn.lock
pnpm-lock.yaml
51 changes: 0 additions & 51 deletions .eslintrc.cjs

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
GITHUB_ID: ${{ secrets.GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.GITHUB_SECRET }}
GOOGLE_ID: ${{ secrets.GOOGLE_ID }}
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }}
PR_NUM: ${{ github.event.pull_request.number }}

jobs:
Expand All @@ -47,4 +51,4 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Deploy ZotMeet to staging
run: pnpm sst deploy --stage staging-$PR_NUM
run: pnpm --filter zotmeet cdk deploy
58 changes: 49 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
#####################################################################################
# Generated
#####################################################################################

## Packages installed by NPM. https://docs.npmjs.com/about-packages-and-modules
node_modules/

## Vitest coverage output. https://vitest.dev/guide/coverage.html
coverage/

## ESLint cache. https://eslint.org/docs/latest/use/command-line-interface#caching
.eslintcache

## Build outputs.

### SvelteKit outputs.
build/
.svelte-kit/

### tsc out directory, specified in tsconfig.json .
dist/

# Logs.
*.log
.pnpm-debug.log*


#####################################################################################
# Operating System
#####################################################################################

## MacOS folder settings. https://en.wikipedia.org/wiki/.DS_Store
.DS_Store
node_modules
/build
/.svelte-kit
/package

## Windows folder icon settings. https://learn.microsoft.com/en-us/windows/win32/shell/how-to-customize-folders-with-desktop-ini#use-a-desktopini-file
Desktop.ini


#####################################################################################
# Development Environment
#####################################################################################

## Private environment variables.
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

## JetBrains IDE settings.
.idea/

# sst
.sst
cdk.context.json
## VSCode settings.
.vscode/

## Local SQLite database.
prisma/dev.db
40 changes: 29 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
#####################################################################################
# Generated
#####################################################################################

## Packages installed by NPM. https://docs.npmjs.com/about-packages-and-modules
node_modules/

## Vitest coverage output. https://vitest.dev/guide/coverage.html
coverage/

## Build outputs.

### SvelteKit outputs.
.svelte-kit/
build/

### tsc out directory, specified in tsconfig.json .
dist/

#####################################################################################
# Development
#####################################################################################

## Lock files for NPM, Yarn, and PNPM respectively.
package-lock.json
yarn.lock
pnpm-lock.yaml

## JetBrains IDE settings.
.idea/

## VSCode settings.
.vscode/
9 changes: 9 additions & 0 deletions apps/zotmeet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#####################################################################################
# Development Environment
#####################################################################################

## Local SQLite database.
prisma/dev.db

## CDK output.
cdk.out/
File renamed without changes.
70 changes: 70 additions & 0 deletions apps/zotmeet/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "zotmeet",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"cdk": "cdk --app 'npx tsx tools/cdk/index.ts'",
"check": "svelte-check",
"dev": "vite",
"format": "prettier --write .",
"postinstall": "prisma generate && svelte-kit sync",
"lint": "eslint --fix .",
"prettier": "3.1.0",
"preview": "vite preview",
"test": "vitest"
},
"dependencies": {
"@auth/core": "^0.18.3",
"@floating-ui/dom": "^1.5.3",
"@fullcalendar/core": "^6.1.9",
"@fullcalendar/daygrid": "^6.1.9",
"@fullcalendar/interaction": "^6.1.9",
"@fullcalendar/list": "^6.1.9",
"@fullcalendar/timegrid": "^6.1.9",
"@prisma/client": "5.6.0",
"@tanstack/svelte-query": "^5.8.7",
"arktype": "1.0.28-alpha",
"dayjs": "^1.11.10",
"devalue": "^4.3.2",
"mdsvex": "^0.11.0",
"superjson": "^2.2.1",
"svelte-range-slider-pips": "^2.2.3"
},
"devDependencies": {
"@aponia.js/adapter-prisma": "^0.2.0",
"@aponia.js/core": "^0.2.0",
"@aponia.js/sveltekit": "^0.2.0",
"@bevm0/trpc-svelte-query": "^0.10.0",
"@bevm0/trpc-sveltekit": "^0.9.22",
"@iconify/json": "^2.2.147",
"@skeletonlabs/skeleton": "^2.5.1",
"@skeletonlabs/tw-plugin": "^0.2.4",
"@svelte.kit/adapter-aws": "^0.2.3",
"@svelte.kit/cdk": "^0.2.3",
"@sveltejs/kit": "1.27.6",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@trpc/client": "^10.44.1",
"@trpc/server": "^10.44.1",
"@types/eslint__eslintrc": "^2.1.1",
"@types/node": "^20.10.0",
"autoprefixer": "^10.4.14",
"aws-cdk": "^2.111.0",
"aws-cdk-lib": "2.110.1",
"dotenv": "^16.3.1",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier-plugin-packagejson": "2.4.6",
"prettier-plugin-prisma": "5.0.0",
"prettier-plugin-svelte": "3.1.2",
"prisma": "5.6.0",
"svelte": "^4.2.7",
"svelte-check": "3.6.2",
"tailwindcss": "^3.3.2",
"typescript": "5.2.2",
"unplugin-icons": "^0.17.4",
"vite": "4.5.0"
}
}
15 changes: 15 additions & 0 deletions apps/zotmeet/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check

import autoprefixer from 'autoprefixer'
import tailwindcss from 'tailwindcss'

/**
* @type{import('postcss-load-config').ConfigFn}
*/
function config() {
return {
plugins: [tailwindcss(), autoprefixer()],
}
}

export default config
70 changes: 70 additions & 0 deletions apps/zotmeet/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "sqlite"
url = "file:./dev.db"
}

model User {
id String @id @default(cuid())

name String?
email String? @unique
image String?

session Session[]
account Account[]

reservations Reservation[]
participations ReservationParticipant[]
timeSlots TimeSlot[]
}

model Account {
id String @id @default(cuid())
provider String
providerAccountId String
user_id String

user User @relation(fields: [user_id], references: [id], onDelete: Cascade)

@@unique([provider, providerAccountId])
}

model Session {
id String @id @default(cuid())
user_id String
expires DateTime

user User @relation(references: [id], fields: [user_id], onDelete: Cascade)
}

model Reservation {
id String @id @default(cuid())
userId String?
participants ReservationParticipant[]
timeSlots TimeSlot[]
user User? @relation(fields: [userId], references: [id])
}

model ReservationParticipant {
reservationId String
reservation Reservation @relation(references: [id], fields: [reservationId], onDelete: Cascade)
userId String
user User @relation(fields: [userId], references: [id])

@@id([userId, reservationId])
@@unique([userId, reservationId])
}

model TimeSlot {
id String @id @default(cuid())
reservationId String
userId String?
start DateTime
end DateTime
reservation Reservation @relation(references: [id], fields: [reservationId], onDelete: Cascade)
user User? @relation(fields: [userId], references: [id])
}
Loading