Skip to content

Commit 0a85884

Browse files
committed
feat: add basic routes and sign-in page for auth-react skill
1 parent 880a7cf commit 0a85884

16 files changed

+272
-7
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
import { createBrowserRouter, Navigate } from 'react-router-dom'
2+
import { Protect } from '@riligar/auth-react'
3+
4+
// Layouts and Loaders
5+
import Layout from './components/layout.jsx'
6+
import AuthLoader from './components/auth-loader.jsx'
7+
8+
// Feature Wrappers (if applicable)
9+
import RequireFeature from './components/require-feature.jsx'
10+
11+
// Auth Pages
12+
import SignInPage from './pages/auth/signin.jsx'
13+
import SignUpPage from './pages/auth/signup.jsx'
14+
import VerifyEmailPage from './pages/auth/verify-email.jsx'
15+
16+
// Business Pages (Sample placeholders for the pattern)
17+
import Home from './pages/home.jsx'
18+
import FeaturesList from './pages/features/index.jsx'
19+
import FeatureDetail from './pages/features/detail.jsx'
20+
21+
/**
22+
* ROUTES PATTERN TEMPLATE
23+
*
24+
* Instructions:
25+
* 1. Auth Routes: Grouped under /auth. Non-authenticated.
26+
* 2. Protected Routes: Wrapped with <Protect />.
27+
* 3. Main Layout: Nested inside the Protected group to ensure all app pages have sidebars/headers.
28+
* 4. Feature Wrappers: Use components like <RequireFeature /> to enforce business logic (e.g. valid subscription).
29+
*/
30+
export const router = createBrowserRouter([
31+
// Group 1: Public/Authentication Routes
32+
{
33+
path: '/auth',
34+
children: [
35+
{
36+
index: true,
37+
element: (
38+
<Navigate
39+
to="/auth/signin"
40+
replace
41+
/>
42+
),
43+
},
44+
{ path: 'signin', element: <SignInPage /> },
45+
{ path: 'signup', element: <SignUpPage /> },
46+
{ path: 'verify-email', element: <VerifyEmailPage /> },
47+
],
48+
},
49+
50+
// Group 2: Protected Application Routes
51+
{
52+
element: (
53+
<Protect
54+
fallback={<AuthLoader />}
55+
signInUrl="/auth/signin"
56+
/>
57+
),
58+
children: [
59+
{
60+
path: '/',
61+
element: <Layout />,
62+
children: [
63+
// Landing/Dashboard
64+
{
65+
index: true,
66+
element: <Home />,
67+
},
68+
69+
// Feature Example (with business logic wrapper)
70+
{
71+
path: 'features',
72+
element: (
73+
<RequireFeature>
74+
<FeaturesList />
75+
</RequireFeature>
76+
),
77+
},
78+
{
79+
path: 'features/:id',
80+
element: (
81+
<RequireFeature>
82+
<FeatureDetail />
83+
</RequireFeature>
84+
),
85+
},
86+
87+
// Simple Protected Page (without extra wrapper)
88+
{
89+
path: 'settings',
90+
element: <Home />, // Reuse component or standard page
91+
},
92+
],
93+
},
94+
],
95+
},
96+
97+
// Catch-all: Redirect to Home
98+
{
99+
path: '*',
100+
element: (
101+
<Navigate
102+
to="/"
103+
replace
104+
/>
105+
),
106+
},
107+
])
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { SignIn } from '@riligar/auth-react'
2+
import { Center } from '@mantine/core'
3+
import { notifications } from '@mantine/notifications'
4+
import { useNavigate } from 'react-router-dom'
5+
import { IconUserPlus, IconX, IconMail } from '@tabler/icons-react'
6+
7+
import logoTipo from '/images/logotipo.webp'
8+
9+
export default function SignInPage() {
10+
const navigate = useNavigate()
11+
12+
const handleSuccess = () => {
13+
notifications.show({
14+
title: 'Bem-vindo!',
15+
message: 'Login realizado com sucesso.',
16+
color: 'green',
17+
icon: <IconUserPlus size={18} />,
18+
})
19+
navigate('/')
20+
}
21+
22+
const handleError = error => {
23+
notifications.show({
24+
title: 'Erro',
25+
message: error.message || 'Falha ao realizar login.',
26+
color: 'red',
27+
icon: <IconX size={18} />,
28+
})
29+
}
30+
31+
const handleMagicLinkSent = email => {
32+
notifications.show({
33+
title: 'Sucesso',
34+
message: `Link de acesso enviado para ${email}`,
35+
color: 'brand',
36+
icon: <IconMail size={18} />,
37+
})
38+
}
39+
40+
const handleForgotPasswordSent = email => {
41+
notifications.show({
42+
title: 'Sucesso',
43+
message: `E-mail de recuperação enviado para ${email}`,
44+
color: 'brand',
45+
icon: <IconMail size={18} />,
46+
})
47+
}
48+
49+
return (
50+
<Center
51+
h="100vh"
52+
bg="gray.0"
53+
>
54+
<SignIn
55+
logo={logoTipo}
56+
logoWidth={111}
57+
onSuccess={handleSuccess}
58+
onError={handleError}
59+
onMagicLinkSent={handleMagicLinkSent}
60+
onForgotPasswordSent={handleForgotPasswordSent}
61+
/>
62+
</Center>
63+
)
64+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { SignUp } from '@riligar/auth-react'
2+
import { Center } from '@mantine/core'
3+
import { notifications } from '@mantine/notifications'
4+
import { useNavigate } from 'react-router-dom'
5+
import { IconMail, IconX } from '@tabler/icons-react'
6+
7+
import logoTipo from '/images/logotipo.webp'
8+
9+
export default function SignUpPage() {
10+
const navigate = useNavigate()
11+
12+
const handleSuccess = () => {
13+
notifications.show({
14+
title: 'Sucesso',
15+
message: 'Conta criada com sucesso!',
16+
color: 'green',
17+
icon: <IconMail size={18} />,
18+
})
19+
navigate('/auth/signin')
20+
}
21+
22+
const handleError = error => {
23+
notifications.show({
24+
title: 'Erro',
25+
message: error.message || 'Falha ao criar conta.',
26+
color: 'red',
27+
icon: <IconX size={18} />,
28+
})
29+
}
30+
31+
return (
32+
<Center
33+
h="100vh"
34+
bg="gray.0"
35+
>
36+
<SignUp
37+
logo={logoTipo}
38+
logoWidth={111}
39+
onSuccess={handleSuccess}
40+
onError={handleError}
41+
/>
42+
</Center>
43+
)
44+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { VerifyEmail } from '@riligar/auth-react'
2+
import { Center } from '@mantine/core'
3+
import { notifications } from '@mantine/notifications'
4+
import { useNavigate } from 'react-router-dom'
5+
import { IconCheck, IconX } from '@tabler/icons-react'
6+
7+
import logoTipo from '/images/logotipo.webp'
8+
9+
export default function VerifyEmailPage() {
10+
const navigate = useNavigate()
11+
12+
const handleSuccess = () => {
13+
notifications.show({
14+
title: 'Sucesso',
15+
message: 'Email verificado com sucesso! Você já pode fazer login.',
16+
color: 'green',
17+
icon: <IconCheck size={18} />,
18+
})
19+
navigate('/auth/signin')
20+
}
21+
22+
const handleError = error => {
23+
notifications.show({
24+
title: 'Erro',
25+
message: error.message || 'Falha ao verificar email.',
26+
color: 'red',
27+
icon: <IconX size={18} />,
28+
})
29+
}
30+
31+
return (
32+
<Center
33+
h="100vh"
34+
bg="gray.0"
35+
>
36+
<VerifyEmail
37+
logo={logoTipo}
38+
logoWidth={111}
39+
onSuccess={handleSuccess}
40+
onError={handleError}
41+
/>
42+
</Center>
43+
)
44+
}

.agent/skills/riligar-dev-website/SKILL.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@ description: Specialist in High-Conversion Landing Pages using RiLiGar Design Sy
77

88
You are a conversion optimization expert and UI architect specializing in landing pages. Your mission is to create pages that **convert**, using the minimalist "Content-First" aesthetic of RiLiGar.
99

10+
https://alpha.mantine.dev/llms.txt
11+
https://alpha.mantine.dev/llms.txt
12+
https://alpha.mantine.dev/llms.txt
13+
https://alpha.mantine.dev/llms.txt
14+
https://alpha.mantine.dev/llms.txt
15+
1016
## Philosophy: "Trust Through Clarity"
1117

1218
A landing page must be a slippery slope: the user should slide effortlessly from the headline to the CTA.
1319

14-
- **Zero Friction:** No distractions. Every element must support the primary goal.
15-
- **High Trust:** Professional typography, perfect alignment, and social proof.
16-
- **Value First:** Focus on benefits, not just features.
20+
- **Zero Friction:** No distractions. Every element must support the primary goal.
21+
- **High Trust:** Professional typography, perfect alignment, and social proof.
22+
- **Value First:** Focus on benefits, not just features.
1723

1824
## Guia de Referência
1925

2026
Para construir páginas de alta conversão:
2127

22-
- **[Conversion Frameworks](references/conversion-framework.md)**: Estruturas psicológicas (AIDA, PAS) e fluxo narrativo.
23-
- **[Section Blueprints](references/section-blueprints.md)**: Layouts "Gold Standard" para seções críticas (Hero, Bento Grids, Pricing).
24-
- **[Copywriting Guide](references/copywriting-guide.md)**: Tom de voz e padrões de texto persuasivo.
25-
- **[Visual Knowledge Base](assets/)**: Diretório de referências visuais e layouts reais para inspiração estética e estrutural.
28+
- **[Conversion Frameworks](references/conversion-framework.md)**: Estruturas psicológicas (AIDA, PAS) e fluxo narrativo.
29+
- **[Section Blueprints](references/section-blueprints.md)**: Layouts "Gold Standard" para seções críticas (Hero, Bento Grids, Pricing).
30+
- **[Copywriting Guide](references/copywriting-guide.md)**: Tom de voz e padrões de texto persuasivo.
31+
- **[Visual Knowledge Base](assets/)**: Diretório de referências visuais e layouts reais para inspiração estética e estrutural.
2632

2733
## Como Usar esta Skill
2834

111 KB
Loading
Binary file not shown.
177 KB
Loading
128 KB
Loading
153 KB
Loading

0 commit comments

Comments
 (0)