citations-supabase-demo
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords
Repository
Basic Info
- Host: GitHub
- Owner: d9k
- Language: PLpgSQL
- Default Branch: main
- Homepage: http://citations.d9k.ru
- Size: 1.54 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README-supabase.md
Supabase demo
.env configuration for direct PostgreSQL connection
Copy .env.template to .env.
Fill environment variables ULTRA_PUBLIC_SUPABASE_URL, ULTRA_PUBLIC_SUPABASE_ANON_KEY at .env values from https://supabase.com/dashboard/project/_/settings/database.
ULTRA_ prefix means variables will be available at ultra frontend.
.env configuration for runtime
Supabase URL & anon key for .env configuration:
https://supabase.com/dashboard/project/_/settings/api
Adding admin permissions
Get user id from schema auth, table users, column id. Id example: ccdcd9a1-2df3-4cdf-8298-a37cd209dd0d.
Example query to add claim:
sql
SELECT set_claim('ccdcd9a1-2df3-4cdf-8298-a37cd209dd0d'::uuid, 'claim_edit_all_content', '1');
User must relogin to use updated permissions.
Function set_claim installed from custom claims project.
Available claims:
claim_edit_all_content- edit content created by other usersclaim_delete_all_content- delete content created by other usersclaim_edit_all_profiles- edit other users profilesclaim_publish- publish and unpublish content rows (make visible for guests).
Connecting (linking) to Supabase
Login to Supabase
Generate access token at https://supabase.com/dashboard/account/tokens, then
bash
pnpm exec supabase login
Then enter access token. Local system keyring password may be asked then.
Link to Supabase project
Then go to your project subase settings -> Project settings -> general -> copy "
and run
bash
pnpm exec supabase link --project-ref=<Reference_ID>
If error cannot read config in ...: open supabase/config.toml run pnpm exec supabase init first.
Installation
bash
pnpm install
Init schema
At first go to your project page at Supabase, choose "SQL editor" on left menu and init schema with schema you want to test, for example demo.sql.
Data dump (via supabase db dump ...)
bash
pnpm run db:dump:data
pnpm run db:dump:schema
pnpm run db:dump:migration
or just
bash
pnpm run db:dump
Data dump (via pg_dump)
`supabase db dump` doesn't dump triggers | issue #1726 | cli
bash
deno task run db-pg-dump
Generate typescript types
bash
pnpm exec supabase gen types typescript --linked > src/db/supabase-types-generated.ts
See
Generate schema
Execute pnpm run db:gen:json-schema.
Migrations: after remote change
After schema change on remote database:
bash
pnpm exec supabase db pull
If scipt asks Update remote migration history table? [Y/n] choose n to not rename
New migration supabase/migrations/NNNNNNNNNNNNNN_remote_schema.sql will be created. Rename remote_schema to more meaningful name.
Then list migations with new one:
bash
pnpm exec supabase migration list
If migration not marked remote as applied, then
bash
pnpm exec supabase migration repair 202XXXXXXXXXX --status applied
when 202XXXXXXXXXX is local migration timestamp
See also
Related demo projects:
Owner
- Name: Dmitry
- Login: d9k
- Kind: user
- Website: https://bitbucket.org/d9kd9k/
- Repositories: 54
- Profile: https://github.com/d9k
Feel free to contact me at https://vk.com/d9kd9k
GitHub Events
Total
Last Year
Dependencies
- @storybook/addon-essentials ^7.5.0 development
- @storybook/addon-interactions ^7.5.0 development
- @storybook/addon-links ^7.5.0 development
- @storybook/addon-onboarding ^1.0.8 development
- @storybook/blocks ^7.5.0 development
- @storybook/builder-vite ^7.5.0 development
- @storybook/jest ^0.2.3 development
- @storybook/react ^7.5.0 development
- @storybook/react-vite ^7.5.0 development
- @storybook/test-runner ^0.14.0 development
- @storybook/testing-library ^0.2.2 development
- @types/react 18.2.0 development
- @types/react-dom 18.2.0 development
- @typescript-eslint/eslint-plugin ^6.0.0 development
- @typescript-eslint/parser ^6.0.0 development
- @vitejs/plugin-react-swc ^3.3.2 development
- eslint ^8.45.0 development
- eslint-plugin-react-hooks ^4.6.0 development
- eslint-plugin-react-refresh ^0.4.3 development
- eslint-plugin-storybook ^0.6.15 development
- jest 27 development
- react-helmet-async 1.3.0 development
- react-router-dom 6.3.0 development
- storybook ^7.5.0 development
- storybook-dark-mode ^3.0.1 development
- typescript ^5.0.2 development
- vite ^4.4.5 development
- @mantine/core 7.1.2
- @mantine/form 7.1.2
- @mantine/hooks 7.1.2
- fela 12.2.1
- fela-beautifier 12.2.1
- fela-dom 12.2.1
- fela-enforce-longhands 12.2.1
- fela-plugin-expand-shorthand 12.2.1
- fela-plugin-extend 12.2.1
- fela-plugin-unit 12.2.1
- fela-plugin-validator 12.2.1
- fela-tools 12.2.1
- react 18.2.0
- react-dom 18.2.0
- react-fela 12.2.1
- 1297 dependencies