Updated at: 12/09/2025
- Adjust backend to query and compatible with new database layout.
- Fix cookie and token bug.
- Instead using server-side Next.js or middleware, use client side to authenticate.
- Authenticated user can now bypass login page and redirect to Home page.
- Change the api endpoints.
- Add
/checkendpoint to authenticate user. - Add
/user/hometo get user data for Home page. - Add api prefix
/v1/api/authto make it scalable and categorized.
Backend is not now connect with all front end page. We're still working on.
-
If no api request is made within a certain amount of time, the backend server will automatically shut down and enter idle mode. Although it takes less than a minute, the server will immediately restart in response to the api request.
-
Auth cookie only last for 30 minutes.
-
Supabase Free plan projects are paused after 1 week of inactivity. Database owner will have to restore it every time the database paused.
- Can not register new user from back end to supabase database
error: new row violates row-level security policy for table "students"fix:
- Ensure that
SUPABASE_KEYin.envfile is aservice_rolekey. - Ensure the Row-Level Security policy (RLS) allowed the SQL methodology ex.
select(),insert()
- Fly.io can't deploy
error: when starting up the backend
fix:
- use `
- use
CMD ["fastapi", "run", "--host", "0.0.0.0", "--port", "8000"]to run in DockerFile - Also
EXPOSE 8000port