1. Supabase Setup and Authentication
Set up a Supabase project and implement basic user authentication:
- Create a new Supabase project called “restaurant-app”.
- Implement login/logout functionality.
- Create basic HTML pages (register.html, login.html, index.html).
- Use the Supabase JavaScript client with ES modules.
- Test registration, logout and login flow.
2. Restaurant Database and RLS
Create a restaurant’s table with proper Row Level Security:
- Create a
restaurantstable with: name, cuisine_type, description, rating, location, price_range, user_id. - Set up RLS policies for: public read access, user-only create/update/delete.
- Add sample restaurant data for testing.
- Verify that RLS policies prevent unauthorised access.
3. Restaurant CRUD Operations
Build a restaurant management interface:
- Display all restaurants in a public listing.
- Allow authenticated users to add new restaurants.
- Implement edit functionality for restaurant owners only.
- Add delete functionality with proper confirmation.
- Show/hide edit/delete buttons based on restaurant ownership.
- Include proper error handling and user feedback.
4. Advanced Features
Enhance the restaurant app with additional Supabase features:
- Add search and filtering (by name, cuisine type, price range, minimum rating).
- Implement real-time updates when new restaurants are added.
- Create a “My Restaurants” page showing only the user’s own restaurants.