- π Multiple Authentication Methods - Traditional, 2FA, or Passwordless
- π Internationalization - Multi-language support (English, Spanish)
- π¨ Theming - Light/Dark modes with system preference detection
- π± Responsive - Works on mobile, tablet, and desktop
- π¦ State Management - Type-safe Pinia stores
- π Analytics - Ready-to-use tracking infrastructure
- π¨ Error Handling - Centralized logging and user-friendly messages
|
Ionic |
Vue 3 |
TypeScript |
Pinia |
Tailwind |
Vite |
- Quick Start
- Authentication System
- Project Structure
- Configuration
- Development Commands
- Customization
- License
- Node.js (v16+)
- npm or yarn
# Clone the repository
git clone https://github.com/iguanai/app-boilerplate.git
cd app-boilerplate
# Install dependencies
npm install
# or
yarn install
# Start the development server
npm run dev
# or
ionic serveThe boilerplate implements a flexible authentication system with three methods:
Username/Password + Remember me option
- Standard authentication flow
- Password reset functionality
- Secure password storage
Username/Password + Two-factor verification
- Enhanced security for sensitive applications
- Support for authenticator apps
- Backup recovery codes
Email/SMS + 6-digit verification code
- Simplified login experience
- No passwords to remember
- Support for both email and SMS verification
src/
βββ assets/ # Static assets (images, styles)
βββ components/ # Reusable components
β βββ common/ # Business logic components
β βββ ui/ # UI components
βββ layouts/ # Layout components
βββ locales/ # i18n translation files
βββ router/ # Vue Router configuration
βββ services/ # Services (API, auth, etc.)
β βββ auth/ # Authentication providers
βββ stores/ # Pinia stores
βββ theme/ # Theme variables and styles
βββ utils/ # Utility functions
βββ views/ # Page components
βββ App.vue # Root component
βββ main.ts # App entry point
βββ config.ts # App configuration
The application is highly configurable through the src/config.ts file:
// Example configuration
const config = {
app: {
name: 'Your App Name',
version: '1.0.0',
description: 'Your app description',
baseUrl: 'https://yourapp.com',
},
auth: {
sessionDuration: 60, // Session duration in minutes
defaultProvider: 'traditional', // Default auth provider
providers: {
traditional: { enabled: true },
secure: { enabled: true, require2FA: false },
easy: { enabled: true, methods: ['email', 'sms'] }
}
},
// See config.ts for full configuration options
};Create an .env file in the root directory:
# App
VITE_APP_NAME=Your App Name
# API
VITE_API_URL=https://api.example.com
# Analytics
VITE_ANALYTICS_ENABLED=true
| Command | Description |
|---|---|
ionic serve |
Start development server |
ionic build |
Build for production |
npm run dev |
Start Vite dev server |
npm run build |
Build with TypeScript check |
npm run lint |
Run ESLint with auto-fix |
npm run lint:check |
Run ESLint without auto-fix |
npm run test:unit |
Run unit tests with Vitest |
npm run test:e2e |
Run E2E tests with Cypress |
- Create a new provider class implementing the
AuthProviderinterface:
// src/services/auth/CustomProvider.ts
import { AuthProvider } from './AuthProvider';
export class CustomProvider implements AuthProvider {
// Implement required methods
}- Register the provider in the auth provider registry
- Add UI components for the new authentication method
- Create a new JSON file in the
src/localesdirectory (e.g.,fr.json) - Copy the structure from
en.jsonand translate the values - Update the language switcher component to include the new language
This boilerplate includes PWA support out of the box:
- Installable on mobile and desktop
- Offline support
- Native-like experience
- Automatic updates
This project is licensed under the MIT License - see the LICENSE file for details.
Developed with β€οΈ by IguanAI Labs Inc.