feat: implement platform management system with authentication and dashboard

- Add PlatformUser model with roles (SUPER_ADMIN, ADMIN, SUPPORT)
- Implement platform authentication with NextAuth
- Create platform dashboard showing companies, users, and sessions
- Add platform API endpoints for company management
- Update landing page with SaaS design
- Include test improvements and accessibility updates
This commit is contained in:
2025-06-28 12:41:50 +02:00
parent aa0e9d5ebc
commit 60d1b72aba
18 changed files with 1190 additions and 53 deletions

View File

@ -25,7 +25,7 @@ const mockExistingUsers = [
},
{
id: "user-2",
email: "admin@example.com",
email: "admin@example.com",
role: "ADMIN",
companyId: "test-company-id",
},
@ -332,7 +332,7 @@ describe("User Invitation Integration Tests", () => {
describe("Email Validation Edge Cases", () => {
it("should handle very long email addresses", async () => {
const longEmail = "a".repeat(250) + "@example.com";
const { req, res } = createMocks({
method: "POST",
body: {
@ -354,7 +354,7 @@ describe("User Invitation Integration Tests", () => {
it("should handle special characters in email", async () => {
const specialEmail = "test+tag@example-domain.co.uk";
const { req, res } = createMocks({
method: "POST",
body: {
@ -424,7 +424,7 @@ describe("User Invitation Integration Tests", () => {
it("should handle multiple rapid invitations", async () => {
const emails = [
"user1@example.com",
"user2@example.com",
"user2@example.com",
"user3@example.com",
"user4@example.com",
"user5@example.com",