diff --git a/README.md b/README.md index e9cd259..c89080c 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,3 @@ Event Ticketing of the future Events is built with [Deno Deploy](https://deno.com/deploy) support in mind but you should be able to selfhost this anywhere, just copy `.env.example` to `.env` and update the variables. If you're selfhosting then KV requires an extra step with either creating a `db` folder for the database to be stored in or setting `DENO_DEPLOYMENT_ID` to anything for it to use the global version. - diff --git a/deno.jsonc b/deno.jsonc index f57ab6f..c6f9b5f 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,19 +1,19 @@ { "lock": false, + "nodeModulesDir": true, "tasks": { "check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", "fmt": "npx prettier . --write", "start": "deno run -A --unstable --watch=static/,routes/ dev.ts", "build": "deno run -A --unstable dev.ts build", - "preview": "deno run -A main.ts", - "update": "deno run --unstable -A -r https://fresh.deno.dev/update .", - "css": "npx tailwindcss -i ./static/styles.css -o ./static/output.css --watch --minify" + "preview": "deno run --unstable -A main.ts", + "update": "deno run --unstable -A -r https://fresh.deno.dev/update ." }, "lint": { "rules": { "tags": ["fresh", "recommended"] } }, "imports": { - "$fresh/": "https://deno.land/x/fresh@1.5.4/", - "preact": "https://esm.sh/preact@10.18.1", - "preact/": "https://esm.sh/preact@10.18.1/", + "$fresh/": "https://deno.land/x/fresh@1.6.0/", + "preact": "https://esm.sh/preact@10.19.2", + "preact/": "https://esm.sh/preact@10.19.2/", "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.1", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.0", @@ -22,9 +22,11 @@ "$tabler/": "https://deno.land/x/tabler_icons_tsx@0.0.5/tsx/", "yup": "https://esm.sh/yup@1.2.0", "imagekit": "npm:imagekit@4.1.3", - "barcode-polyfill": "https://esm.sh/barcode-detector@2.0.3" + "barcode-polyfill": "https://esm.sh/barcode-detector@2.0.3", + "tailwindcss": "npm:tailwindcss@3.3.5", + "tailwindcss/": "npm:/tailwindcss@3.3.5/", + "tailwindcss/plugin": "npm:/tailwindcss@3.3.5/plugin.js" }, "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, - "nodeModulesDir": true, "exclude": ["**/_fresh/*"] } diff --git a/fresh.config.ts b/fresh.config.ts index 5cace59..333787d 100644 --- a/fresh.config.ts +++ b/fresh.config.ts @@ -1,13 +1,16 @@ import { defineConfig } from "$fresh/server.ts"; import unocssPlugin from "@/utils/plugins/unocss.ts"; +import tailwind from "$fresh/plugins/tailwind.ts"; import { kvInsightsPlugin } from "https://deno.land/x/deno_kv_insights@v0.7.0-beta/mod.ts"; import { kv } from "@/utils/db/kv.ts"; + export default defineConfig({ plugins: [ unocssPlugin(), kvInsightsPlugin({ kv, }), + tailwind() ], }); diff --git a/fresh.gen.ts b/fresh.gen.ts index c2aaab6..ed673fc 100644 --- a/fresh.gen.ts +++ b/fresh.gen.ts @@ -2,157 +2,176 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $0 from "./routes/(public)/faq.tsx"; -import * as $1 from "./routes/(public)/features.tsx"; -import * as $2 from "./routes/(public)/pricing.tsx"; -import * as $3 from "./routes/(public)/privacy-policy.tsx"; -import * as $4 from "./routes/(public)/terms-of-service.tsx"; -import * as $5 from "./routes/_404.tsx"; -import * as $6 from "./routes/_app.tsx"; -import * as $7 from "./routes/_layout.tsx"; -import * as $8 from "./routes/api/auth/login.ts"; -import * as $9 from "./routes/api/auth/signout.ts"; -import * as $10 from "./routes/api/events/create.ts"; -import * as $11 from "./routes/api/events/delete.ts"; -import * as $12 from "./routes/api/events/edit.ts"; -import * as $13 from "./routes/api/events/image/fill.ts"; -import * as $14 from "./routes/api/events/image/upload.ts"; -import * as $15 from "./routes/api/events/team/invite.ts"; -import * as $16 from "./routes/api/events/team/remove.ts"; -import * as $17 from "./routes/api/events/team/update.ts"; -import * as $18 from "./routes/api/events/ticket.ts"; -import * as $19 from "./routes/events/(pages)/_layout.tsx"; -import * as $20 from "./routes/events/(pages)/attending/_layout.tsx"; -import * as $21 from "./routes/events/(pages)/attending/index.tsx"; -import * as $22 from "./routes/events/(pages)/organizing/_layout.tsx"; -import * as $23 from "./routes/events/(pages)/organizing/accounting.tsx"; -import * as $24 from "./routes/events/(pages)/organizing/collections.tsx"; -import * as $25 from "./routes/events/(pages)/organizing/create.tsx"; -import * as $26 from "./routes/events/(pages)/organizing/discounts.tsx"; -import * as $27 from "./routes/events/(pages)/organizing/index.tsx"; -import * as $28 from "./routes/events/[id]/(no-layout)/_layout.tsx"; -import * as $29 from "./routes/events/[id]/(no-layout)/index.tsx"; -import * as $30 from "./routes/events/[id]/(no-layout)/tickets/[tixid].tsx"; -import * as $31 from "./routes/events/[id]/_layout.tsx"; -import * as $32 from "./routes/events/[id]/editing.tsx"; -import * as $33 from "./routes/events/[id]/scanning.tsx"; -import * as $34 from "./routes/events/[id]/team.tsx"; -import * as $35 from "./routes/events/[id]/tickets.tsx"; -import * as $36 from "./routes/events/notfound.tsx"; -import * as $37 from "./routes/index.tsx"; -import * as $38 from "./routes/kv-insights/_layout.tsx"; -import * as $39 from "./routes/kv-insights/_middleware.ts"; -import * as $40 from "./routes/login.tsx"; -import * as $$0 from "./islands/components/dropinUI/trash.tsx"; -import * as $$1 from "./islands/components/peices/ticket.tsx"; -import * as $$2 from "./islands/components/pickers/calender.tsx"; -import * as $$3 from "./islands/components/pickers/dropdown.tsx"; -import * as $$4 from "./islands/components/pickers/image.tsx"; -import * as $$5 from "./islands/components/pickers/select.tsx"; -import * as $$6 from "./islands/components/pickers/time.tsx"; -import * as $$7 from "./islands/entriesManagement.tsx"; -import * as $$8 from "./islands/entryManagement.tsx"; -import * as $$9 from "./islands/events/components/card.tsx"; -import * as $$10 from "./islands/events/creation/createForm.tsx"; -import * as $$11 from "./islands/events/creation/one.tsx"; -import * as $$12 from "./islands/events/creation/three.tsx"; -import * as $$13 from "./islands/events/creation/two.tsx"; -import * as $$14 from "./islands/events/creation/zero.tsx"; -import * as $$15 from "./islands/events/editing/delete.tsx"; -import * as $$16 from "./islands/events/editing/images.tsx"; -import * as $$17 from "./islands/events/editing/settings.tsx"; -import * as $$18 from "./islands/events/editing/showtimesettings.tsx"; -import * as $$19 from "./islands/events/editing/ticketSettings.tsx"; -import * as $$20 from "./islands/events/list/filters.tsx"; -import * as $$21 from "./islands/events/scanning.tsx"; -import * as $$22 from "./islands/events/teams/filters.tsx"; -import * as $$23 from "./islands/events/teams/invite.tsx"; -import * as $$24 from "./islands/events/teams/manage.tsx"; -import * as $$25 from "./islands/events/viewing/availability.tsx"; -import * as $$26 from "./islands/events/viewing/register.tsx"; -import * as $$27 from "./islands/events/viewing/showtimes.tsx"; -import * as $$28 from "./islands/loginForm.tsx"; -import * as $$29 from "./islands/queueManagement.tsx"; -import * as $$30 from "./islands/tickets/filters.tsx"; +import * as $_public_faq from "./routes/(public)/faq.tsx"; +import * as $_public_features from "./routes/(public)/features.tsx"; +import * as $_public_pricing from "./routes/(public)/pricing.tsx"; +import * as $_public_privacy_policy from "./routes/(public)/privacy-policy.tsx"; +import * as $_public_terms_of_service from "./routes/(public)/terms-of-service.tsx"; +import * as $_404 from "./routes/_404.tsx"; +import * as $_app from "./routes/_app.tsx"; +import * as $_layout from "./routes/_layout.tsx"; +import * as $api_auth_login from "./routes/api/auth/login.ts"; +import * as $api_auth_signout from "./routes/api/auth/signout.ts"; +import * as $api_events_create from "./routes/api/events/create.ts"; +import * as $api_events_delete from "./routes/api/events/delete.ts"; +import * as $api_events_edit from "./routes/api/events/edit.ts"; +import * as $api_events_fetch from "./routes/api/events/fetch.ts"; +import * as $api_events_image_fill from "./routes/api/events/image/fill.ts"; +import * as $api_events_image_upload from "./routes/api/events/image/upload.ts"; +import * as $api_events_scan from "./routes/api/events/scan.ts"; +import * as $api_events_team_invite from "./routes/api/events/team/invite.ts"; +import * as $api_events_team_remove from "./routes/api/events/team/remove.ts"; +import * as $api_events_team_update from "./routes/api/events/team/update.ts"; +import * as $api_events_ticket from "./routes/api/events/ticket.ts"; +import * as $events_pages_layout from "./routes/events/(pages)/_layout.tsx"; +import * as $events_pages_attending_layout from "./routes/events/(pages)/attending/_layout.tsx"; +import * as $events_pages_attending_index from "./routes/events/(pages)/attending/index.tsx"; +import * as $events_pages_organizing_layout from "./routes/events/(pages)/organizing/_layout.tsx"; +import * as $events_pages_organizing_accounting from "./routes/events/(pages)/organizing/accounting.tsx"; +import * as $events_pages_organizing_collections from "./routes/events/(pages)/organizing/collections.tsx"; +import * as $events_pages_organizing_create from "./routes/events/(pages)/organizing/create.tsx"; +import * as $events_pages_organizing_discounts from "./routes/events/(pages)/organizing/discounts.tsx"; +import * as $events_pages_organizing_index from "./routes/events/(pages)/organizing/index.tsx"; +import * as $events_id_no_layout_layout from "./routes/events/[id]/(no-layout)/_layout.tsx"; +import * as $events_id_no_layout_index from "./routes/events/[id]/(no-layout)/index.tsx"; +import * as $events_id_no_layout_tickets_tixid_ from "./routes/events/[id]/(no-layout)/tickets/[tixid].tsx"; +import * as $events_id_layout from "./routes/events/[id]/_layout.tsx"; +import * as $events_id_editing from "./routes/events/[id]/editing.tsx"; +import * as $events_id_scanning from "./routes/events/[id]/scanning.tsx"; +import * as $events_id_team from "./routes/events/[id]/team.tsx"; +import * as $events_id_tickets from "./routes/events/[id]/tickets.tsx"; +import * as $events_notfound from "./routes/events/notfound.tsx"; +import * as $index from "./routes/index.tsx"; +import * as $kv_insights_layout from "./routes/kv-insights/_layout.tsx"; +import * as $kv_insights_middleware from "./routes/kv-insights/_middleware.ts"; +import * as $login from "./routes/login.tsx"; +import * as $components_dropinUI_trash from "./islands/components/dropinUI/trash.tsx"; +import * as $components_peices_ticket from "./islands/components/peices/ticket.tsx"; +import * as $components_pickers_calender from "./islands/components/pickers/calender.tsx"; +import * as $components_pickers_dropdown from "./islands/components/pickers/dropdown.tsx"; +import * as $components_pickers_image from "./islands/components/pickers/image.tsx"; +import * as $components_pickers_select from "./islands/components/pickers/select.tsx"; +import * as $components_pickers_time from "./islands/components/pickers/time.tsx"; +import * as $entriesManagement from "./islands/entriesManagement.tsx"; +import * as $entryManagement from "./islands/entryManagement.tsx"; +import * as $events_components_card from "./islands/events/components/card.tsx"; +import * as $events_components_registerErrors from "./islands/events/components/registerErrors.tsx"; +import * as $events_creation_createForm from "./islands/events/creation/createForm.tsx"; +import * as $events_creation_one from "./islands/events/creation/one.tsx"; +import * as $events_creation_three from "./islands/events/creation/three.tsx"; +import * as $events_creation_two from "./islands/events/creation/two.tsx"; +import * as $events_creation_zero from "./islands/events/creation/zero.tsx"; +import * as $events_editing_delete from "./islands/events/editing/delete.tsx"; +import * as $events_editing_images from "./islands/events/editing/images.tsx"; +import * as $events_editing_settings from "./islands/events/editing/settings.tsx"; +import * as $events_editing_showtimesettings from "./islands/events/editing/showtimesettings.tsx"; +import * as $events_editing_ticketSettings from "./islands/events/editing/ticketSettings.tsx"; +import * as $events_list_filters from "./islands/events/list/filters.tsx"; +import * as $events_scanning from "./islands/events/scanning.tsx"; +import * as $events_teams_filters from "./islands/events/teams/filters.tsx"; +import * as $events_teams_invite from "./islands/events/teams/invite.tsx"; +import * as $events_teams_manage from "./islands/events/teams/manage.tsx"; +import * as $events_viewing_availability from "./islands/events/viewing/availability.tsx"; +import * as $events_viewing_register from "./islands/events/viewing/register.tsx"; +import * as $events_viewing_showtimes from "./islands/events/viewing/showtimes.tsx"; +import * as $loginForm from "./islands/loginForm.tsx"; +import * as $queueManagement from "./islands/queueManagement.tsx"; +import * as $tickets_filters from "./islands/tickets/filters.tsx"; +import { type Manifest } from "$fresh/server.ts"; const manifest = { routes: { - "./routes/(public)/faq.tsx": $0, - "./routes/(public)/features.tsx": $1, - "./routes/(public)/pricing.tsx": $2, - "./routes/(public)/privacy-policy.tsx": $3, - "./routes/(public)/terms-of-service.tsx": $4, - "./routes/_404.tsx": $5, - "./routes/_app.tsx": $6, - "./routes/_layout.tsx": $7, - "./routes/api/auth/login.ts": $8, - "./routes/api/auth/signout.ts": $9, - "./routes/api/events/create.ts": $10, - "./routes/api/events/delete.ts": $11, - "./routes/api/events/edit.ts": $12, - "./routes/api/events/image/fill.ts": $13, - "./routes/api/events/image/upload.ts": $14, - "./routes/api/events/team/invite.ts": $15, - "./routes/api/events/team/remove.ts": $16, - "./routes/api/events/team/update.ts": $17, - "./routes/api/events/ticket.ts": $18, - "./routes/events/(pages)/_layout.tsx": $19, - "./routes/events/(pages)/attending/_layout.tsx": $20, - "./routes/events/(pages)/attending/index.tsx": $21, - "./routes/events/(pages)/organizing/_layout.tsx": $22, - "./routes/events/(pages)/organizing/accounting.tsx": $23, - "./routes/events/(pages)/organizing/collections.tsx": $24, - "./routes/events/(pages)/organizing/create.tsx": $25, - "./routes/events/(pages)/organizing/discounts.tsx": $26, - "./routes/events/(pages)/organizing/index.tsx": $27, - "./routes/events/[id]/(no-layout)/_layout.tsx": $28, - "./routes/events/[id]/(no-layout)/index.tsx": $29, - "./routes/events/[id]/(no-layout)/tickets/[tixid].tsx": $30, - "./routes/events/[id]/_layout.tsx": $31, - "./routes/events/[id]/editing.tsx": $32, - "./routes/events/[id]/scanning.tsx": $33, - "./routes/events/[id]/team.tsx": $34, - "./routes/events/[id]/tickets.tsx": $35, - "./routes/events/notfound.tsx": $36, - "./routes/index.tsx": $37, - "./routes/kv-insights/_layout.tsx": $38, - "./routes/kv-insights/_middleware.ts": $39, - "./routes/login.tsx": $40, + "./routes/(public)/faq.tsx": $_public_faq, + "./routes/(public)/features.tsx": $_public_features, + "./routes/(public)/pricing.tsx": $_public_pricing, + "./routes/(public)/privacy-policy.tsx": $_public_privacy_policy, + "./routes/(public)/terms-of-service.tsx": $_public_terms_of_service, + "./routes/_404.tsx": $_404, + "./routes/_app.tsx": $_app, + "./routes/_layout.tsx": $_layout, + "./routes/api/auth/login.ts": $api_auth_login, + "./routes/api/auth/signout.ts": $api_auth_signout, + "./routes/api/events/create.ts": $api_events_create, + "./routes/api/events/delete.ts": $api_events_delete, + "./routes/api/events/edit.ts": $api_events_edit, + "./routes/api/events/fetch.ts": $api_events_fetch, + "./routes/api/events/image/fill.ts": $api_events_image_fill, + "./routes/api/events/image/upload.ts": $api_events_image_upload, + "./routes/api/events/scan.ts": $api_events_scan, + "./routes/api/events/team/invite.ts": $api_events_team_invite, + "./routes/api/events/team/remove.ts": $api_events_team_remove, + "./routes/api/events/team/update.ts": $api_events_team_update, + "./routes/api/events/ticket.ts": $api_events_ticket, + "./routes/events/(pages)/_layout.tsx": $events_pages_layout, + "./routes/events/(pages)/attending/_layout.tsx": + $events_pages_attending_layout, + "./routes/events/(pages)/attending/index.tsx": + $events_pages_attending_index, + "./routes/events/(pages)/organizing/_layout.tsx": + $events_pages_organizing_layout, + "./routes/events/(pages)/organizing/accounting.tsx": + $events_pages_organizing_accounting, + "./routes/events/(pages)/organizing/collections.tsx": + $events_pages_organizing_collections, + "./routes/events/(pages)/organizing/create.tsx": + $events_pages_organizing_create, + "./routes/events/(pages)/organizing/discounts.tsx": + $events_pages_organizing_discounts, + "./routes/events/(pages)/organizing/index.tsx": + $events_pages_organizing_index, + "./routes/events/[id]/(no-layout)/_layout.tsx": $events_id_no_layout_layout, + "./routes/events/[id]/(no-layout)/index.tsx": $events_id_no_layout_index, + "./routes/events/[id]/(no-layout)/tickets/[tixid].tsx": + $events_id_no_layout_tickets_tixid_, + "./routes/events/[id]/_layout.tsx": $events_id_layout, + "./routes/events/[id]/editing.tsx": $events_id_editing, + "./routes/events/[id]/scanning.tsx": $events_id_scanning, + "./routes/events/[id]/team.tsx": $events_id_team, + "./routes/events/[id]/tickets.tsx": $events_id_tickets, + "./routes/events/notfound.tsx": $events_notfound, + "./routes/index.tsx": $index, + "./routes/kv-insights/_layout.tsx": $kv_insights_layout, + "./routes/kv-insights/_middleware.ts": $kv_insights_middleware, + "./routes/login.tsx": $login, }, islands: { - "./islands/components/dropinUI/trash.tsx": $$0, - "./islands/components/peices/ticket.tsx": $$1, - "./islands/components/pickers/calender.tsx": $$2, - "./islands/components/pickers/dropdown.tsx": $$3, - "./islands/components/pickers/image.tsx": $$4, - "./islands/components/pickers/select.tsx": $$5, - "./islands/components/pickers/time.tsx": $$6, - "./islands/entriesManagement.tsx": $$7, - "./islands/entryManagement.tsx": $$8, - "./islands/events/components/card.tsx": $$9, - "./islands/events/creation/createForm.tsx": $$10, - "./islands/events/creation/one.tsx": $$11, - "./islands/events/creation/three.tsx": $$12, - "./islands/events/creation/two.tsx": $$13, - "./islands/events/creation/zero.tsx": $$14, - "./islands/events/editing/delete.tsx": $$15, - "./islands/events/editing/images.tsx": $$16, - "./islands/events/editing/settings.tsx": $$17, - "./islands/events/editing/showtimesettings.tsx": $$18, - "./islands/events/editing/ticketSettings.tsx": $$19, - "./islands/events/list/filters.tsx": $$20, - "./islands/events/scanning.tsx": $$21, - "./islands/events/teams/filters.tsx": $$22, - "./islands/events/teams/invite.tsx": $$23, - "./islands/events/teams/manage.tsx": $$24, - "./islands/events/viewing/availability.tsx": $$25, - "./islands/events/viewing/register.tsx": $$26, - "./islands/events/viewing/showtimes.tsx": $$27, - "./islands/loginForm.tsx": $$28, - "./islands/queueManagement.tsx": $$29, - "./islands/tickets/filters.tsx": $$30, + "./islands/components/dropinUI/trash.tsx": $components_dropinUI_trash, + "./islands/components/peices/ticket.tsx": $components_peices_ticket, + "./islands/components/pickers/calender.tsx": $components_pickers_calender, + "./islands/components/pickers/dropdown.tsx": $components_pickers_dropdown, + "./islands/components/pickers/image.tsx": $components_pickers_image, + "./islands/components/pickers/select.tsx": $components_pickers_select, + "./islands/components/pickers/time.tsx": $components_pickers_time, + "./islands/entriesManagement.tsx": $entriesManagement, + "./islands/entryManagement.tsx": $entryManagement, + "./islands/events/components/card.tsx": $events_components_card, + "./islands/events/components/registerErrors.tsx": + $events_components_registerErrors, + "./islands/events/creation/createForm.tsx": $events_creation_createForm, + "./islands/events/creation/one.tsx": $events_creation_one, + "./islands/events/creation/three.tsx": $events_creation_three, + "./islands/events/creation/two.tsx": $events_creation_two, + "./islands/events/creation/zero.tsx": $events_creation_zero, + "./islands/events/editing/delete.tsx": $events_editing_delete, + "./islands/events/editing/images.tsx": $events_editing_images, + "./islands/events/editing/settings.tsx": $events_editing_settings, + "./islands/events/editing/showtimesettings.tsx": + $events_editing_showtimesettings, + "./islands/events/editing/ticketSettings.tsx": + $events_editing_ticketSettings, + "./islands/events/list/filters.tsx": $events_list_filters, + "./islands/events/scanning.tsx": $events_scanning, + "./islands/events/teams/filters.tsx": $events_teams_filters, + "./islands/events/teams/invite.tsx": $events_teams_invite, + "./islands/events/teams/manage.tsx": $events_teams_manage, + "./islands/events/viewing/availability.tsx": $events_viewing_availability, + "./islands/events/viewing/register.tsx": $events_viewing_register, + "./islands/events/viewing/showtimes.tsx": $events_viewing_showtimes, + "./islands/loginForm.tsx": $loginForm, + "./islands/queueManagement.tsx": $queueManagement, + "./islands/tickets/filters.tsx": $tickets_filters, }, baseUrl: import.meta.url, -}; +} satisfies Manifest; export default manifest; diff --git a/routes/_app.tsx b/routes/_app.tsx index 72a7afb..74dda1f 100644 --- a/routes/_app.tsx +++ b/routes/_app.tsx @@ -1,10 +1,10 @@ -import { AppProps } from "$fresh/server.ts"; +import { PageProps } from "$fresh/server.ts"; import { asset } from "$fresh/runtime.ts"; import { Partial } from "$fresh/runtime.ts"; const logo = asset("/orange-logo.svg"); -export default function App({ Component }: AppProps) { +export default function App({ Component }: PageProps) { return (
@@ -12,7 +12,7 @@ export default function App({ Component }: AppProps) {