Running the Next.js Supabase Turbo project
Learn how to run the Next.js Supabase Turbo project on your local machine.
To run the project, follow these steps to start the development server, Supabase, and Stripe (optional for billing system testing).
Steps to run the project
Learn how to run the Next.js Supabase Turbo project on your local machine.
0. Ensure Docker is running
Before starting the Supabase container, ensure Docker is running. This is because the Supabase container is a Docker container, and we can't start it without Docker running.
Have Docker running
If you don't have Docker running, please start it now, otherwise the Supabase container will not start.
Docker Desktop is the best way to get started with Docker. Alternatively, on MacOS, you can use OrbStack as an alternative to Docker Desktop.
1. Start Supabase
After ensuring Docker is running, start the Supabase container using the following command:
pnpm run supabase:web:start
This command initiates the local Supabase web server. This allows us to develop locally without having to deploy to Supabase.
When you're ready to deploy the project to production, follow the checklist to ensure everything is properly configured.
Please read the Supabase documentation for more information about starting Supabase locally.
Give Docker enough resources
If the command above fails, you may need to give Docker more resources. Please refer to your Docker software's documentation for instructions on how to do this.
2. Start the Development Server
To start the web application development server, run:
# Start the development serverpnpm dev
This command launches:
- Web Application: The web application is built using Next.js and serves as the main user interface for the application at port 3000
- Dev Tools: The dev tools are built using Next.js and serve as a debugging tool for the web application at port 3010. For more information, please refer to the Dev Tools documentation.
You will mostly be using the web application at port 3000.
Quick Start Credentials
Makerkit seeds the DB with a few users by default. To login as a test user, you can use the following credentials:
- Email:
test@makerkit.dev
- Password:
testingpassword
To confirm email addresses, visit Inbucket. Supabase uses Inbucket/Mailpit to capture emails sent during the authentication process.
Bookmark the Inbucket/Mailpit URL, as you will need it quite often.
Ensure it's working: Please try to use the test user credentials to login. If these credentials are not working, please try re-seeding the DB with the following command:
pnpm run supabase:web:reset
Troubleshooting
If you're hitting issues with loading modules (such as Module not found: Can't resolve 'react-dom/client'
), you're likely running into Windows-related issues with Node.js.
Please see the the Troubleshooting section for more information.
Super Admin Credentials
To login as a super admin, you can use the following credentials:
{ "email": "super-admin@makerkit.dev", "password": "testingpassword"}
Makerkit forces MFA (multi-factor authentication) for the Super Admin user. Therefore, to sign in with the Super Admin user, please use the following steps to pass MFA:
- TOTP: Use the following TOTP generator to generate a TOTP code.
- Secret Key: Use the test secret key
NHOHJVGPO3R3LKVPRMNIYLCDMBHUM2SE
to generate a TOTP code. - Verify: Use the TOTP code and the secret key to verify the MFA code. Make sure the TOTP code is not expired when you verify the MFA code.
3. Start Stripe (Optional)
To test the billing system, start Stripe by running:
pnpm run stripe:listen
This command routes webhooks to your local machine.
You now have the Next.js Supabase Turbo project running on your local machine. 🚀
4. Email Server for local development
To receive emails during local development, Supabase uses Mailpit. It's from here that you will be receving emails from both Supabase Auth and transactional emails during local development.
You can bookmark the Mailpit URL, as you will need it quite often.
Deploying to Production
When you're ready to deploy the project to production, follow the checklist to ensure everything is set up correctly.
Note: Using Supabase's hosted instance is similar to deploying to production. Therefore, you still need to follow the checklist to ensure everything is properly configured.