A modern admin panel for organizations with robust authentication
πΈ Screenshots β’ β¨ Features β’ π οΈ Technologies β’ π Installation β’ π Usage
- β User login and registration
- β Automatic organization creation on registration
- β Session management
- β Password change
- β Profile updates
- β Organization creation and updates
- β Complete organization information panel
- β Member invitations with role assignment
- β Role management (Owner/Admin/Member)
- β Member listing with detailed information
- β Pending invitations management
- β Member removal and role updates
- β Organization slug and logo management
- β Real-time member count
- β Custom select components for better UX
- β Responsive design with Tailwind CSS
- β Reusable components
- β Elegant toast notifications
- β Form validation
- β Intuitive navigation
- β Authentication guards
- β Route protection
- β Form validation
- β Secure session management
- Angular 20 - Main framework
- TypeScript 5.9.2 - Programming language
- Tailwind CSS 4.1.13 - CSS framework
- RxJS - Reactive programming
- Elysia - Ultra-fast web framework for Bun
- Better Auth - Modern authentication system
- Drizzle ORM - Type-safe ORM for TypeScript
- Bun - Ultra-fast JavaScript runtime
- PostgreSQL - Relational database
- Zod - TypeScript schema validation
- Better Auth 1.3.17 - Modern authentication library
- Organization Plugin - Organization management
- ngx-sonner - Toast notifications
- Angular Reactive Forms - Reactive forms
- Angular Router - Routing
- Angular CLI 20.3.2 - Development tools
- PostCSS - CSS processing
- Autoprefixer - Browser compatibility
This frontend project connects to a robust backend API built with modern technologies:
The backend is a modern and ultra-fast API built with:
- β‘ Elysia - Ultra-fast web framework running on Bun
- π Better Auth - Complete authentication system
- π Drizzle ORM - Type-safe ORM with PostgreSQL
- π‘οΈ Zod - TypeScript schema validation
- π OpenAPI - Automatic documentation
// Authentication
POST /auth/sign-up # Create account
POST /auth/sign-in # Login
POST /auth/sign-out # Logout
GET /auth/session # Get current session
// Organizations
POST /auth/organization/create # Create organization
GET /auth/organization/list # List organizations
POST /auth/organization/invite # Invite member
GET /auth/organization/members # List members
// Users
GET /users/:id # Get user by ID
PUT /users/:id # Update user
To use this frontend, you need the backend running:
# Clone the backend repository
git clone https://github.com/nobruf/elysia-better-auth.git
cd elysia-better-auth
# Install dependencies
bun install
# Configure database
cp .env.example .env
# Edit .env with your DATABASE_URL
# Run migrations
bun run db:migrate
bun run db:auth:generate
# Start the server
bun run dev
The backend will be available at http://localhost:4000
and the frontend will connect automatically.
- Node.js 18+
- npm or yarn
- Angular CLI 20+
- Bun (for backend)
- PostgreSQL (for database)
First, you need to configure the backend API:
# Clone the backend repository
git clone https://github.com/nobruf/elysia-better-auth.git
cd elysia-better-auth
# Install dependencies
bun install
# Configure database
cp .env.example .env
# Edit .env with your DATABASE_URL
# Run migrations
bun run db:migrate
bun run db:auth:generate
# Start the backend server
bun run dev
The backend will be running at http://localhost:4000
git clone https://github.com/your-username/angular-better-auth-org.git
cd angular-better-auth-org
npm install
The frontend is already configured to connect to the backend at http://localhost:4000
:
// src/app/services/auth.service.ts
authClient = createAuthClient({
baseURL: 'http://localhost:4000', // Elysia Backend
basePath: '/auth',
plugins: [organizationClient()],
});
npm start
The frontend will be available at http://localhost:4200
This project uses a modern full-stack architecture with clear separation between frontend and backend:
graph TB
A[Angular Frontend<br/>localhost:4200] --> B[Elysia API<br/>localhost:4000]
B --> C[PostgreSQL<br/>Database]
B --> D[Better Auth<br/>Authentication]
A --> E[Tailwind CSS<br/>Styling]
A --> F[Better Auth Client<br/>Auth Management]
B --> G[Drizzle ORM<br/>Database Layer]
B --> H[Zod Validation<br/>Schema Validation]
- Angular Frontend makes requests to Elysia API
- Elysia API processes authentication with Better Auth
- Drizzle ORM manages operations in PostgreSQL
- Responses return to frontend via HTTP/JSON
- Frontend: Better Auth Client for session management
- Backend: Better Auth Server with organization plugins
- Database: Sessions and users stored in PostgreSQL
- Security: HTTPOnly cookies and JWT validation
src/
βββ app/
β βββ components/ # Reusable components
β β βββ layout/ # Layouts (header, sidebar, etc.)
β β βββ ui/ # UI components (button, input)
β βββ pages/ # Application pages
β β βββ (auth)/ # Authentication pages
β β βββ (protect)/ # Protected pages
β βββ services/ # Services (auth, guards)
β βββ app.routes.ts # Route configuration
// Login
await this.authService.signIn(email, password);
// Registration with organization
await this.authService.signUpWithOrganization(email, password, name, organizationName);
// List organizations
await this.authService.listOrganizations();
// Invite member
await this.authService.inviteUserToOrganization(
organizationId, email, role
);
// List members
await this.authService.listMembers(organizationId, limit, offset, ...);
// Update profile
await this.authService.updateUser(name, image);
// Change password
await this.authService.changePassword(currentPassword, newPassword);
// Manage sessions
await this.authService.getSessions();
- Advanced metrics dashboard
- Granular permission system
- External API integrations
- Reports and analytics
- Advanced organization settings
- Notification system
- File upload
- Customizable themes
- Internationalization (i18n)
- Performance optimizations
- Docker containerization
Contributions are welcome! To contribute:
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is under the MIT License. See the LICENSE file for more details.
Bruno Felipy
- GitHub: @nobruf
- LinkedIn: Bruno Felipy
β If this project helped you, consider giving it a star! β