feat: add subscription plans. Add admin panel. Add password recovery

This commit is contained in:
Jose Selesan
2026-10-24 18:31:55 -03:00
parent f5e77c99f6
commit cd82a1e549
42 changed files with 2017 additions and 5 deletions

View File

@@ -10,8 +10,11 @@
import { Route as rootRouteImport } from './routes/__root'
import { Route as AuthenticatedRouteImport } from './routes/_authenticated'
import { Route as AdminRouteImport } from './routes/admin'
import { Route as ForgotPasswordRouteImport } from './routes/forgot-password'
import { Route as LoginRouteImport } from './routes/login'
import { Route as OnboardingRouteImport } from './routes/onboarding'
import { Route as ResetPasswordRouteImport } from './routes/reset-password'
import { Route as SignupRouteImport } from './routes/signup'
import { Route as VerifyEmailRouteImport } from './routes/verify-email'
import { Route as AuthenticatedIndexRouteImport } from './routes/_authenticated/index'
@@ -20,10 +23,12 @@ import { Route as AuthenticatedPaymentsRouteImport } from './routes/_authenticat
import { Route as AuthenticatedProfileRouteImport } from './routes/_authenticated/profile'
import { Route as AuthenticatedSecurityRouteImport } from './routes/_authenticated/security'
import { Route as AuthenticatedSettingsRouteImport } from './routes/_authenticated/settings'
import { Route as AdminIndexRouteImport } from './routes/admin/index'
import { Route as JoinTokenRouteImport } from './routes/join.$token'
import { Route as ReportAbsenceTokenRouteImport } from './routes/report-absence.$token'
import { Route as AuthenticatedGroupsIndexRouteImport } from './routes/_authenticated/groups/index'
import { Route as AuthenticatedGroupsNewRouteImport } from './routes/_authenticated/groups/new'
import { Route as AdminAccountsAccountIdRouteImport } from './routes/admin/accounts.$accountId'
import { Route as AuthenticatedClassSessionIdAttendanceRouteImport } from './routes/_authenticated/class/$sessionId/attendance'
import { Route as AuthenticatedGroupsGroupIdIndexRouteImport } from './routes/_authenticated/groups/$groupId/index'
import { Route as AuthenticatedGroupsGroupIdAnalyticsRouteImport } from './routes/_authenticated/groups/$groupId/analytics'
@@ -34,6 +39,16 @@ const AuthenticatedRoute = AuthenticatedRouteImport.update({
id: '/_authenticated',
getParentRoute: () => rootRouteImport,
} as any)
const AdminRoute = AdminRouteImport.update({
id: '/admin',
path: '/admin',
getParentRoute: () => rootRouteImport,
} as any)
const ForgotPasswordRoute = ForgotPasswordRouteImport.update({
id: '/forgot-password',
path: '/forgot-password',
getParentRoute: () => rootRouteImport,
} as any)
const LoginRoute = LoginRouteImport.update({
id: '/login',
path: '/login',
@@ -44,6 +59,11 @@ const OnboardingRoute = OnboardingRouteImport.update({
path: '/onboarding',
getParentRoute: () => rootRouteImport,
} as any)
const ResetPasswordRoute = ResetPasswordRouteImport.update({
id: '/reset-password',
path: '/reset-password',
getParentRoute: () => rootRouteImport,
} as any)
const SignupRoute = SignupRouteImport.update({
id: '/signup',
path: '/signup',
@@ -84,6 +104,11 @@ const AuthenticatedSettingsRoute = AuthenticatedSettingsRouteImport.update({
path: '/settings',
getParentRoute: () => AuthenticatedRoute,
} as any)
const AdminIndexRoute = AdminIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => AdminRoute,
} as any)
const JoinTokenRoute = JoinTokenRouteImport.update({
id: '/join/$token',
path: '/join/$token',
@@ -105,6 +130,11 @@ const AuthenticatedGroupsNewRoute = AuthenticatedGroupsNewRouteImport.update({
path: '/groups/new',
getParentRoute: () => AuthenticatedRoute,
} as any)
const AdminAccountsAccountIdRoute = AdminAccountsAccountIdRouteImport.update({
id: '/accounts/$accountId',
path: '/accounts/$accountId',
getParentRoute: () => AdminRoute,
} as any)
const AuthenticatedClassSessionIdAttendanceRoute =
AuthenticatedClassSessionIdAttendanceRouteImport.update({
id: '/class/$sessionId/attendance',
@@ -138,8 +168,11 @@ const AuthenticatedGroupsGroupIdAttendeesNewRoute =
export interface FileRoutesByFullPath {
'/': typeof AuthenticatedIndexRoute
'/admin': typeof AdminRouteWithChildren
'/forgot-password': typeof ForgotPasswordRoute
'/login': typeof LoginRoute
'/onboarding': typeof OnboardingRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/verify-email': typeof VerifyEmailRoute
'/billing': typeof AuthenticatedBillingRoute
@@ -149,7 +182,9 @@ export interface FileRoutesByFullPath {
'/settings': typeof AuthenticatedSettingsRoute
'/join/$token': typeof JoinTokenRoute
'/report-absence/$token': typeof ReportAbsenceTokenRoute
'/admin/': typeof AdminIndexRoute
'/groups/new': typeof AuthenticatedGroupsNewRoute
'/admin/accounts/$accountId': typeof AdminAccountsAccountIdRoute
'/groups/': typeof AuthenticatedGroupsIndexRoute
'/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
'/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
@@ -158,8 +193,10 @@ export interface FileRoutesByFullPath {
'/groups/$groupId/attendees/new': typeof AuthenticatedGroupsGroupIdAttendeesNewRoute
}
export interface FileRoutesByTo {
'/forgot-password': typeof ForgotPasswordRoute
'/login': typeof LoginRoute
'/onboarding': typeof OnboardingRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/verify-email': typeof VerifyEmailRoute
'/billing': typeof AuthenticatedBillingRoute
@@ -170,7 +207,9 @@ export interface FileRoutesByTo {
'/join/$token': typeof JoinTokenRoute
'/report-absence/$token': typeof ReportAbsenceTokenRoute
'/': typeof AuthenticatedIndexRoute
'/admin': typeof AdminIndexRoute
'/groups/new': typeof AuthenticatedGroupsNewRoute
'/admin/accounts/$accountId': typeof AdminAccountsAccountIdRoute
'/groups': typeof AuthenticatedGroupsIndexRoute
'/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
'/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
@@ -181,8 +220,11 @@ export interface FileRoutesByTo {
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/_authenticated': typeof AuthenticatedRouteWithChildren
'/admin': typeof AdminRouteWithChildren
'/forgot-password': typeof ForgotPasswordRoute
'/login': typeof LoginRoute
'/onboarding': typeof OnboardingRoute
'/reset-password': typeof ResetPasswordRoute
'/signup': typeof SignupRoute
'/verify-email': typeof VerifyEmailRoute
'/_authenticated/billing': typeof AuthenticatedBillingRoute
@@ -193,7 +235,9 @@ export interface FileRoutesById {
'/join/$token': typeof JoinTokenRoute
'/report-absence/$token': typeof ReportAbsenceTokenRoute
'/_authenticated/': typeof AuthenticatedIndexRoute
'/admin/': typeof AdminIndexRoute
'/_authenticated/groups/new': typeof AuthenticatedGroupsNewRoute
'/admin/accounts/$accountId': typeof AdminAccountsAccountIdRoute
'/_authenticated/groups/': typeof AuthenticatedGroupsIndexRoute
'/_authenticated/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
'/_authenticated/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
@@ -205,8 +249,11 @@ export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/'
| '/admin'
| '/forgot-password'
| '/login'
| '/onboarding'
| '/reset-password'
| '/signup'
| '/verify-email'
| '/billing'
@@ -216,7 +263,9 @@ export interface FileRouteTypes {
| '/settings'
| '/join/$token'
| '/report-absence/$token'
| '/admin/'
| '/groups/new'
| '/admin/accounts/$accountId'
| '/groups/'
| '/class/$sessionId/attendance'
| '/groups/$groupId/analytics'
@@ -225,8 +274,10 @@ export interface FileRouteTypes {
| '/groups/$groupId/attendees/new'
fileRoutesByTo: FileRoutesByTo
to:
| '/forgot-password'
| '/login'
| '/onboarding'
| '/reset-password'
| '/signup'
| '/verify-email'
| '/billing'
@@ -237,7 +288,9 @@ export interface FileRouteTypes {
| '/join/$token'
| '/report-absence/$token'
| '/'
| '/admin'
| '/groups/new'
| '/admin/accounts/$accountId'
| '/groups'
| '/class/$sessionId/attendance'
| '/groups/$groupId/analytics'
@@ -247,8 +300,11 @@ export interface FileRouteTypes {
id:
| '__root__'
| '/_authenticated'
| '/admin'
| '/forgot-password'
| '/login'
| '/onboarding'
| '/reset-password'
| '/signup'
| '/verify-email'
| '/_authenticated/billing'
@@ -259,7 +315,9 @@ export interface FileRouteTypes {
| '/join/$token'
| '/report-absence/$token'
| '/_authenticated/'
| '/admin/'
| '/_authenticated/groups/new'
| '/admin/accounts/$accountId'
| '/_authenticated/groups/'
| '/_authenticated/class/$sessionId/attendance'
| '/_authenticated/groups/$groupId/analytics'
@@ -270,8 +328,11 @@ export interface FileRouteTypes {
}
export interface RootRouteChildren {
AuthenticatedRoute: typeof AuthenticatedRouteWithChildren
AdminRoute: typeof AdminRouteWithChildren
ForgotPasswordRoute: typeof ForgotPasswordRoute
LoginRoute: typeof LoginRoute
OnboardingRoute: typeof OnboardingRoute
ResetPasswordRoute: typeof ResetPasswordRoute
SignupRoute: typeof SignupRoute
VerifyEmailRoute: typeof VerifyEmailRoute
JoinTokenRoute: typeof JoinTokenRoute
@@ -287,6 +348,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthenticatedRouteImport
parentRoute: typeof rootRouteImport
}
'/admin': {
id: '/admin'
path: '/admin'
fullPath: '/admin'
preLoaderRoute: typeof AdminRouteImport
parentRoute: typeof rootRouteImport
}
'/forgot-password': {
id: '/forgot-password'
path: '/forgot-password'
fullPath: '/forgot-password'
preLoaderRoute: typeof ForgotPasswordRouteImport
parentRoute: typeof rootRouteImport
}
'/login': {
id: '/login'
path: '/login'
@@ -301,6 +376,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof OnboardingRouteImport
parentRoute: typeof rootRouteImport
}
'/reset-password': {
id: '/reset-password'
path: '/reset-password'
fullPath: '/reset-password'
preLoaderRoute: typeof ResetPasswordRouteImport
parentRoute: typeof rootRouteImport
}
'/signup': {
id: '/signup'
path: '/signup'
@@ -357,6 +439,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthenticatedSettingsRouteImport
parentRoute: typeof AuthenticatedRoute
}
'/admin/': {
id: '/admin/'
path: '/'
fullPath: '/admin/'
preLoaderRoute: typeof AdminIndexRouteImport
parentRoute: typeof AdminRoute
}
'/join/$token': {
id: '/join/$token'
path: '/join/$token'
@@ -385,6 +474,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthenticatedGroupsNewRouteImport
parentRoute: typeof AuthenticatedRoute
}
'/admin/accounts/$accountId': {
id: '/admin/accounts/$accountId'
path: '/accounts/$accountId'
fullPath: '/admin/accounts/$accountId'
preLoaderRoute: typeof AdminAccountsAccountIdRouteImport
parentRoute: typeof AdminRoute
}
'/_authenticated/class/$sessionId/attendance': {
id: '/_authenticated/class/$sessionId/attendance'
path: '/class/$sessionId/attendance'
@@ -463,10 +559,25 @@ const AuthenticatedRouteWithChildren = AuthenticatedRoute._addFileChildren(
AuthenticatedRouteChildren,
)
interface AdminRouteChildren {
AdminIndexRoute: typeof AdminIndexRoute
AdminAccountsAccountIdRoute: typeof AdminAccountsAccountIdRoute
}
const AdminRouteChildren: AdminRouteChildren = {
AdminIndexRoute: AdminIndexRoute,
AdminAccountsAccountIdRoute: AdminAccountsAccountIdRoute,
}
const AdminRouteWithChildren = AdminRoute._addFileChildren(AdminRouteChildren)
const rootRouteChildren: RootRouteChildren = {
AuthenticatedRoute: AuthenticatedRouteWithChildren,
AdminRoute: AdminRouteWithChildren,
ForgotPasswordRoute: ForgotPasswordRoute,
LoginRoute: LoginRoute,
OnboardingRoute: OnboardingRoute,
ResetPasswordRoute: ResetPasswordRoute,
SignupRoute: SignupRoute,
VerifyEmailRoute: VerifyEmailRoute,
JoinTokenRoute: JoinTokenRoute,