a03a80a1868b0ca6c827dd7c1ee9f266a7b37c1c
feat: improved on ui so that user can see the spaces they want to view easier See merge request gk1623/drp-48!3 Co-authored-by: Gleb Koval <gleb@koval.net> Co-authored-by: Caspar Jojo Asaam <caspar@dyn3159-95.wlan.ic.ac.uk>
DRP 48
Developing
Prerequisites
- You must have Docker installed.
- You must have NodeJS installed (version doesn't matter too much, but ideally make sure it's not something insanely old like v16).
- Also make sure you have
npminstalled (this usually, but not always, comes with nodejs).
- Also make sure you have
- Use vscode for the smoothest experience, otherwise you'll need to configure your IDE manually.
- VSCode will prompt you to "Install recommended extensions". Allow it to do so.
Getting started
- Install dependencies with
npm install. - Start the local Supabase (Database + Authentication) with
npx supabase start.- You must have Docker installed and running.
- Visit the dashboard at http://127.0.0.1:54323
- Copy
.env.exampleinto.env, and replace "your-anon-key-here" with the anon key from step 2. - Start a local development server with
npm run dev.
Useful commands
npm run devto run a local development server.npm run buildto build a production server (output inbuild/).npm run checkwill type-check the codebase.npm run lintwill style-check the codebase.npm run formatwill auto-format the codebase.- Note that if you're using VSCode with all the suggested extensions, VSCode should be formatting all your files on save.
npm run gen:typeswill generate the types for the database.
Database management
npx supabase startwil start a local dev databasenpx supabase stopwill stop the local dev database (data is persisted unless you do a reset).npx supabase db push --localwill apply migrations to your local dev database. Useful if someone else has made new SQL migrations.npx supabase db resetwill completely reset the local dev database.npx supabase diff db -f <migration-name>will generate a new migration file based on the current state of the database. This isn't 100% foolproof, so don't use it blindly.
What's where?
supabase/contains Supabase configurations and database schemas. See the READMEs in there fore more info.static/contains static files. This will probably only ever be favicon.- The favicon is the small icon you can see for the website in its browser tab.
e2e/contains end-to-end tests. We'll start looking into these a little later..gitlab-ci.ymlcontains CI scripts.src/app.htmlis the base template HTML file for ALL pages.src/lib/contains any code that isn't specific to some page.src/routes/contains page-specific code.
The reset are just config files that you shouldn't need to read/edit.
Description
Languages
Svelte
81.8%
TypeScript
13.7%
PLpgSQL
2.9%
JavaScript
1.1%
HTML
0.5%