API documentation can be found in here https://khutwah.docs.apiary.io
- NextJS
- Tailwind CSS with @shadcn/ui
- Supabase as cloud database service
First, prepare your .env file, example is on .env.example. Ask your peers for the key value if needed.
Three basic env key you can obtain by yourself
SUPABASE_API_URL=
SUPABASE_ANON_KEY=
STUDENTS_DEFAULT_PASSWORD=
DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
You can come up with your own STUDENTS_DEFAULT_PASSWORD that only work on your local. This is for system used only, student will be authenticated using mumtaz API, and session will be created in our system using this password. More Detail: https://github.com/khutwah/khutwah-web/tree/main/src/app/login
Then, run local supabase application:
supabase start
If you already start the supabase before, always good practice to run supabase migration up in case there is new update to database
that you have not already apply to your local database.
Running supabase start will give you information about SUPABASE_API_URL and SUPABASE_ANON_KEY.
SUPABASE_API_URL = API URL
SUPABASE_ANON_KEY = anon key
Then, run the development server:
npm run devRun this if you want to use seed data so you dont have to manually create one.
supabase migration up # Only if there are migrations not yet synchronized to local database.
npm run dbtypes:gen
npm run seed:sync
npm run seedPlease check circles data.
.
├── supabase
└── src
├── models
├── components
├── utils
└── hooks
Directory where we store supabase related code. e.g. migrations, seeds
Directory where we store constants and typescript types
Directory where we store React Components
Directory where we store React Hooks
Directory where we store utilities function