Skip to content

OpenSourceSarajevo/rjecnik

Repository files navigation

Rječnik

Prerequisites

Getting Started

  1. Navigate to rjecnik-web and/or rjecnik-admin:
cd rjecnik-web
cd rjecnik-admin
  1. Install npm packages:
npm install
  1. Configure the application:
cp .env.example .env
  1. Run the application:
npm run dev

Open http://localhost:3000 with your browser to see the result. Make sure to configure a different port for one of the apps if running both.

Setting up auth

  1. Set up a Google Cloud Console app to get a client id and secret.

  2. If you are using supabase via docker, follow the steps for setting the environment variables correctly, and if you are using a hosted instance of supabase follow the official supabase docs for setting up auth providers

2.1. Depending which method of running supabase you choose don't forget to add a correct Authorized redirect URI in your Google Console

  1. Try signing in via google, this will add your email to the database but fail

  2. In the table user_permissions manually assign the app_permission Dictionary.ReadWrite to your user and try signing in again

Running Supabase Locally

  1. Start docker desktop

  2. Export google cloud console secrets:

export AUTH_GOOGLE_CLIENT_ID=
export AUTH_GOOGLE_CLIENT_SECRET=
  1. Start the supabase container:
supabase start
  1. From the console output copy the values of API URL and anon key for NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY

  2. Stop the container

supabase stop
supabase stop --no-backup

Creating migrations

  1. To create a new migration for the supabase database run:
supabase migration new <migration_name>
  1. Navigate to supabase/migrations, find your new migration file and write you SQL.

  2. Apply the new migration by restarting the supabase container

About

Bosnian Language Dictionary

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •