Pausa is a modern web application built with Nuxt and Supabase that serves as a minimal authentication template and starter kit for developers. It provides a robust authentication flow that can be integrated into any application in seconds.
Pausa is a minimal authentication solution that allows developers to integrate a robust authentication flow into their applications in seconds. It functions as a starter template that includes everything needed to handle user authentication and management.
- Frontend: Nuxt with TypeScript
- UI Framework: Nuxt UI
- Database: Supabase (Auth)
- Global State: Pinia
- Animations: VueUse Motion
- State Management: Composables + Stores
- Nuxt for powerful, streamlined development
- Nuxt UI for customizable and sleek UI components
- Pinia for state management simplicity
- Tailwind CSS for responsive and modern design
- Supabase for backend-as-a-service with authentication
- Fully compatible with the Nuxt v4 folder structure
app/
βββ components/
β βββ Auth/ # Complete authentication components
β βββ Dashboard/ # Dashboard components
β βββ Landing/ # Landing page components
β βββ App/ # General app components
βββ layouts/ # Layouts for different sections
βββ pages/ # Application routes
βββ stores/ # Global state with Pinia
βββ middleware/ # Authentication middleware
βββ composables/ # Reusable logic
- β User registration with email/password
- β Traditional login
- β Social provider authentication
- β Password recovery
- β Magic links
- β Route protection middleware
- β Session management with Supabase
- Landing Page β Redirects to dashboard if already authenticated
- Sign Up β Registration with password validation
- Sign In β Login with multiple options
- Dashboard β Protected area with sidebar and navigation
- Responsive Design: Adaptable to mobile and desktop
- Dark/Light Mode: Automatic toggle
- Smooth Animations: Transitions with VueUse Motion
- Reusable Components: Based on Nuxt UI v3
- Collapsible Sidebar: Adaptive navigation
- Validated Forms: With visual feedback
- SEO Optimized: Automatic meta tags
- Strict TypeScript: Complete typing
- Hot Module Replacement: Fast development
- Auto-imports: Automatic Nuxt configuration
- Tailwind CSS v4: Modern styling
- Pinia Store: For authentication data
- Composables: For reusable logic
- Supabase Client: Direct database integration
- Completeness: Complete and functional auth system
- Modernity: Updated technology stack
- Scalability: Modular and extensible architecture
- UX/UI: Modern and accessible interface
- Developer Experience: Optimized configuration
- Documentation: Detailed README
- Startups needing quick authentication
- MVPs with authentication requirements
- Projects requiring login/registration
- Templates for developers
- Basic SaaS applications
- More authentication providers
- Advanced user profiles
- Roles and permissions
- Real-time notifications
- Integrated analytics
- Node.js (>= 14.x)
- npm or yarn
- Supabase Account: You need to have a Supabase account and be familiar with creating projects
- OAuth Providers Setup: Familiarity with creating OAuth applications for Google and GitHub
- Create a free account at Supabase
- Create a new project in your Supabase dashboard
- Familiarize yourself with the Supabase dashboard and API settings
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google+ API
- Go to "Credentials" β "Create Credentials" β "OAuth 2.0 Client IDs"
- Set up authorized redirect URIs:
https://your-project.supabase.co/auth/v1/callback - Copy your Client ID and Client Secret
- Go to GitHub Developer Settings
- Click "New OAuth App"
- Set the Authorization callback URL:
https://your-project.supabase.co/auth/v1/callback - Copy your Client ID and Client Secret
- In your Supabase dashboard, go to "Authentication" β "Providers"
- Enable and configure Google and GitHub providers
- Add the Client IDs and Client Secrets from the previous steps
-
Clone the repository:
git clone https://github.com/{username}/pausa.git cd pausa -
Install dependencies:
npm install # or yarn install -
Set up environment variables:
Create a
.envfile in the root directory and add the following variables:# Supabase Configuration SUPABASE_URL=your_supabase_project_url SUPABASE_KEY=your_supabase_anon_key # Site Configuration NUXT_SITE_URL=http://localhost:3000
How to get Supabase credentials:
- Go to Supabase and create a new project
- Navigate to Settings β API in your Supabase dashboard
- Copy the "Project URL" and "anon/public" key
- Replace
your_supabase_project_urlandyour_supabase_anon_keywith your actual values
Important Notes:
- The OAuth providers (Google and GitHub) are configured directly in your Supabase dashboard
- No additional environment variables are needed for OAuth as Supabase handles the configuration
- Make sure you've completed the OAuth setup steps above before testing social login
For production:
# Production environment variables SUPABASE_URL=https://your-project.supabase.co SUPABASE_KEY=your_supabase_anon_key NUXT_SITE_URL=https://yourdomain.com
Start the development server:
npm run dev
# or
yarn devThe application will be available at http://localhost:3000.
To build the project for production:
npm run build
# or
yarn buildAfter building the project, you can deploy the dist directory to your preferred hosting service.
- Ensure you've enabled the Google+ API in Google Cloud Console
- Verify the redirect URI matches exactly:
https://your-project.supabase.co/auth/v1/callback - Check that your Client ID and Secret are correctly configured in Supabase
- Make sure your Google Cloud project has billing enabled (required for OAuth)
- Verify the Authorization callback URL is set correctly in GitHub OAuth App settings
- Ensure the Client ID and Secret are properly configured in Supabase
- Check that your GitHub OAuth App is not in development mode (if you want to test with non-owner accounts)
- Double-check your
SUPABASE_URLandSUPABASE_KEYin the.envfile - Ensure your Supabase project is active and not paused
- Verify that Authentication is enabled in your Supabase project settings
If you encounter issues:
- Check the Supabase Documentation
- Review the Nuxt 3 Documentation
- Check the Nuxt UI Documentation
- Open an issue in this repository with detailed error information
This project uses Pinia for state management. Example store:
export const useAuthStore = defineStore("useAuthStore", {
state: () => ({
name: "",
email: "",
password: "",
confirm_password: "",
}),
actions: {
resetState() {
// Reset state logic
},
},
});- Auth Components: Complete authentication flow
- Dashboard Components: Admin panel and navigation
- Landing Components: Marketing and entry pages
- App Components: General application components
index.vue: Main landing pageauth/: Authentication pages (sign-in, sign-up, etc.)app/: Protected application pages
default.vue: Default application layoutauth.vue: Authentication layoutdashboard.vue: Dashboard layout with sidebar
- Route Protection: Middleware-based authentication
- Input Validation: Form validation and sanitization
- Session Management: Secure session handling
- Environment Variables: Secure configuration management
- Color Schemes: Dark and light mode support
- Typography: Consistent text hierarchy
- Spacing: Systematic spacing system
- Components: Reusable UI components
Pausa is an excellent starter template that demonstrates best practices in Nuxt 3 development. It offers a complete, modern, and well-structured authentication solution that can serve as a solid foundation for any application requiring user management.
The project follows Nuxt 3 conventions, uses TypeScript correctly, and provides a smooth development experience with all the modern tools needed to build scalable web applications.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License.
