diff --git a/README.md b/README.md index f31c25f..e68d33e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,69 @@ -# BSE 205 - Elective Project +

BSE 205 - Elective Project

+ +- [The Stack](#the-stack) +- [Building](#building) +- [Project Structure](#project-structure) + +# The Stack + +I was aiming for a "*soydev*" stack, I think I've got it. + +- [SvelteKit](https://kit.svelte.dev) +- [DrizzleORM](https://orm.drizzle.team/) +- [Bun SQLite](https://bun.sh/docs/api/sqlite) +- [@shadcn/ui (svelte port)](https://www.shadcn-svelte.com/) + +# Building + +To build this project you will need to install the following dependency programs on your machine: + +- [Bun](https://bun.sh) - https://bun.sh/ + +[Bun](https://bun.sh) is a Javascript runtime that is better suited to the task at hand than NodeJS seems to be, whilst remaining mostly compatible (or at least, compatible enough to run Vite). + +Before running, building, or doing anything with this project, you will need to install it's dependencies, this can be done with: + +```sh +bun install +``` + +You can start the application in development with Hot Module Reloading (HMR), and auto-restarting with: + +```sh +bun run dev +``` + +If you'd like to create a production-ready build, run the following commands. + +```sh +# Create static build, project is configured to build for bun +bun run build +# Run the build, should be done in a docker container +bun ./build/index.js +``` + +# Project Structure + +```py +(project root) +├── src +│   ├── contrib +│   │   └── # code to establish a database +│   ├── lib +│   │   ├── components +│   │   │   └── # shadcn components +│   │   ├── crypto +│   │   │   └── # modules for handling cryptography +│   │   ├── drizzle.ts # database schemas +│   │   └── server +│   │      └── # server only modules +│   ├── routes +│   │   └── # application front-end structure +│   └── test +│   └── # automated tests for testing cryptography modules +├── drizzle +│   └── # database migration history +└── static + └── # static assets +``` -> [!NOTE] -> Add build instructions diff --git a/package.json b/package.json index 9a55064..62a8862 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "lint": "eslint .", "fmt": "prettier --write .", "fmt:check": "prettier --check .", - "generate": "drizzle-kit generate --dialect sqlite --schema ./src/contrib/schema.ts", - "migrate": "bun ./src/contrib/migrate.ts" + "drizzle:generate": "drizzle-kit generate --dialect sqlite --schema ./src/contrib/schema.ts", + "drizzle:migrate": "bun ./src/contrib/migrate.ts" }, "devDependencies": { "@sveltejs/kit": "^2.0.0", diff --git a/src/contrib/schema.ts b/src/contrib/schema.ts deleted file mode 100644 index 2dcf701..0000000 --- a/src/contrib/schema.ts +++ /dev/null @@ -1,17 +0,0 @@ -// import { -// type InferSelectModel, -// type InferInsertModel, -// sql -// } from "drizzle-orm"; - -// import { -// blob, -// sqliteTable, -// text, -// real, -// numeric, -// integer, -// foreignKey, -// } from "drizzle-orm/sqlite-core"; - -export {}; diff --git a/src/lib/crypto/index.ts b/src/lib/crypto/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/lib/drizzle.ts b/src/lib/drizzle.ts index 9e4e1f4..ce508fc 100644 --- a/src/lib/drizzle.ts +++ b/src/lib/drizzle.ts @@ -1 +1,17 @@ -export * from "../contrib/schema"; +// import { +// type InferSelectModel, +// type InferInsertModel, +// sql +// } from "drizzle-orm"; + +// import { +// blob, +// sqliteTable, +// text, +// real, +// numeric, +// integer, +// foreignKey, +// } from "drizzle-orm/sqlite-core"; + +export {} \ No newline at end of file