88 88. Step 14: Extending the functionality
At this point, you have a full-stack SaaS application with:
- Authentication and user management
- A Postgres database with row level security (RLS)
- File storage for images
- AI-powered task labeling
- Subscription billing with Stripe
- Edge Functions for serverless backend logic
From here, you can refine the front end (i.e. Next.js) to your liking, add features, harden security and observability to take the app into production. Ideas to grow your SaaS:
- Email notifications for due tasks or subscription events.
- Task categories, labels, and advanced filters.
- Team workspaces and shared task boards.
- Analytics dashboards (charts of productivity, usage, revenue).
- Mobile app (React Native or Expo).
- Additional subscription tiers (free, pro, enterprise).
- Anything else you can think of …
You can also use this tutorial as a framework to help you develop a brand new different application from scratch.
88.1 Project Structure
Here’s a quick overview of the main folders and what you typically edit:
├── app/ # Next.js app routes and pages
├── components/ # Reusable React UI components
├── hooks/ # Client logic and Supabase integration
├── supabase/
│ ├── functions/ # Edge functions (backend logic)
│ └── migrations/ # Database schema and configurations
└── tests/
└── integration/ # Integration test suite
To extend functionality:
UI changes:
Update layout, pages, and routing inapp/and shared UI incomponents/.Client logic:
Modify data fetching, hooks, and client-side behavior inhooks/.Backend logic:
Add or update Edge Functions insupabase/functions/for new APIs or integrations.Database changes:
Create new migration files insupabase/migrations/to add tables, columns, or policies.
Practice Questions
Easy
Question 1 · Matching
Match each folder with what it holds.
| Folder | What it holds | |
|---|---|---|
1. app/ |
A. Reusable pieces of the user interface (React components) | |
2. components/ |
B. Migration files that define the database: tables, columns and policies | |
3. hooks/ |
C. The Next.js routes and pages | |
4. supabase/functions/ |
D. The integration test suite | |
5. supabase/migrations/ |
E. Client-side logic and the code that talks to Supabase | |
6. tests/integration/ |
F. Edge functions (back-end logic) |
Question 2 · Short answer
According to the start of this page, the finished app already has six capabilities. Name four of them.
Question 3 · True or false
The code in supabase/functions/ runs in the user’s web browser.
Question 4 · Multiple choice
The page calls the project a “full-stack SaaS application”. What does SaaS mean?
- Software as a Service: software people use over the internet, usually for a subscription fee
- Server and Application Storage System: a kind of database
- Secure Authentication as a Service: a login provider such as Google
- Static and Simple Site: a website with no back end
Medium
Question 5 · Short answer
For each change below, which folder would you mainly work in?
- Change how the box that shows a single task looks, everywhere it appears.
- Add a new “Reports” page with its own web address.
- Store a new yes/no value for each task,
reminder_sent, in the database. - Add back-end code that sends emails through an email service, using a secret API key.
Question 6 · Multiple choice
You want every task to have a new estimated_minutes column. Following the page, what is the best way to make this change?
- Add the column by clicking around in the Supabase Table Editor
- Create a new migration file in
supabase/migrations/that adds the column, then push it to the database - Add the column name to
.env.local - Add the column inside a React component in
components/
Question 7 · Short answer
The app’s database uses row level security (RLS). In plain English, what does RLS do in this app, and what must you remember about RLS when a migration adds a brand-new table?
Hard
Question 8 · Long answer
The page says to create new migration files. Why shouldn’t you instead edit an old migration file, such as supabase/migrations/1_init_tasks.sql, that has already been applied to your database?
Question 9 · Long answer
Plan the “email notifications for due tasks” idea. Using the folders on this page, describe what you would add or change, and where. A good answer covers at least three folders.
Question 10 · Compare
The page suggests building a mobile app with React Native or Expo. Which parts of the current system could the mobile app reuse, and which part would you have to build again?