Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
{
label: "ReactJs",
icon: "seti:react",
link: "/react/",
link: "react/",
id: "react",
items: [
{
Expand All @@ -39,7 +39,7 @@ export default defineConfig({
{
label: "SolidJs",
icon: "seti:sublime",
link: "/solid/",
link: "solid/",
id: "solid",
items: [
{
Expand All @@ -61,7 +61,7 @@ export default defineConfig({
{
label: "Backend",
icon: "bars",
link: "/backend/",
link: "backend/",
id: "backend",
items: [
{
Expand All @@ -83,7 +83,7 @@ export default defineConfig({
{
label: "Universal",
icon: "puzzle",
link: "/universal/",
link: "universal/",
id: "universal",
items: [
{
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/backend/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ You should see:

Now that you have the basics set up, explore the specific packages:

- [Node Better Auth](/backend/packages/node-better-auth/) - Learn authentication patterns
- [Node Auth App](/backend/packages/node-auth-app/) - Explore the complete auth service
- [Backend Reference](/backend/reference/) - Dive into the API documentation
- [Node Better Auth](backend/packages/node-better-auth/) - Learn authentication patterns
- [Node Auth App](backend/packages/node-auth-app/) - Explore the complete auth service
- [Backend Reference](backend/reference/) - Dive into the API documentation

## Common Patterns

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/backend/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Effectify provides powerful Node.js backend integrations that combine the robust
<Card title="@effectify/node-better-auth" icon="bars">
Effect integration with better-auth for Node.js applications. Provides type-safe authentication with Effect's error handling and composability.

[Learn more →](/backend/packages/node-better-auth/)
[Learn more →](backend/packages/node-better-auth/)
</Card>

<Card title="@effectify/node-auth-app" icon="server">
Complete authentication server application built with Effect, better-auth, and modern Node.js patterns. Ready-to-deploy auth service.

[Learn more →](/backend/packages/node-auth-app/)
[Learn more →](backend/packages/node-auth-app/)
</Card>
</CardGrid>

Expand All @@ -32,7 +32,7 @@ Ready to start building backend services with Effectify? Check out our getting s
<Card title="Quick Start" icon="rocket">
Get up and running with Effectify in your Node.js backend application in minutes.

[Get Started →](/backend/getting-started/)
[Get Started →](backend/getting-started/)
</Card>

## Key Features
Expand Down
42 changes: 25 additions & 17 deletions apps/docs/src/content/docs/backend/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ export class UsersController {

@Get(":id")
async getUser(@Param("id") id: string) {
return this.effectService.runEffect(
UserService.getById(id),
)
return this.effectService.runEffect(UserService.getById(id))
}
}
```
Expand All @@ -206,7 +204,10 @@ import { Context, Effect, Layer } from "effect"
export class DatabaseService extends Context.Tag("DatabaseService")<
DatabaseService,
{
readonly query: <T>(sql: string, params?: any[]) => Effect.Effect<T[], DatabaseError>
readonly query: <T>(
sql: string,
params?: any[],
) => Effect.Effect<T[], DatabaseError>
}
>() {}

Expand All @@ -224,7 +225,10 @@ const makeDatabaseService = Effect.gen(function*() {
}
})

export const DatabaseServiceLive = Layer.effect(DatabaseService, makeDatabaseService)
export const DatabaseServiceLive = Layer.effect(
DatabaseService,
makeDatabaseService,
)
```

### SQLite with better-sqlite3
Expand All @@ -243,8 +247,14 @@ import { Context, Effect, Layer } from "effect"
export class SqliteService extends Context.Tag("SqliteService")<
SqliteService,
{
readonly query: <T>(sql: string, params?: any[]) => Effect.Effect<T[], DatabaseError>
readonly run: (sql: string, params?: any[]) => Effect.Effect<void, DatabaseError>
readonly query: <T>(
sql: string,
params?: any[],
) => Effect.Effect<T[], DatabaseError>
readonly run: (
sql: string,
params?: any[],
) => Effect.Effect<void, DatabaseError>
}
>() {}

Expand Down Expand Up @@ -420,16 +430,14 @@ export class EnvService extends Context.Tag("EnvService")<
>() {}

export const loadEnvConfig = Effect.gen(function*() {
const requiredEnvVars = [
"DATABASE_URL",
"BETTER_AUTH_SECRET",
"JWT_SECRET",
]
const requiredEnvVars = ["DATABASE_URL", "BETTER_AUTH_SECRET", "JWT_SECRET"]

// Validate required environment variables
for (const envVar of requiredEnvVars) {
if (!process.env[envVar]) {
yield* Effect.fail(new Error(`Missing required environment variable: ${envVar}`))
yield* Effect.fail(
new Error(`Missing required environment variable: ${envVar}`),
)
}
}

Expand Down Expand Up @@ -565,10 +573,10 @@ testRoutes.get("/db-test", (req, res) => {

## Next Steps

- [Getting Started Guide](/backend/getting-started/) - Learn the basics
- [Node Better Auth](/backend/packages/node-better-auth/) - Explore authentication
- [Node Auth App](/backend/packages/node-auth-app/) - Complete auth service
- [Backend Reference](/backend/reference/) - API documentation
- [Getting Started Guide](backend/getting-started/) - Learn the basics
- [Node Better Auth](backend/packages/node-better-auth/) - Explore authentication
- [Node Auth App](backend/packages/node-auth-app/) - Complete auth service
- [Backend Reference](backend/reference/) - API documentation
Comment on lines 574 to +579

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix Next Steps links to avoid /backend/backend/... resolution.

🔧 Suggested fix
-- [Getting Started Guide](backend/getting-started/) - Learn the basics
-- [Node Better Auth](backend/packages/node-better-auth/) - Explore authentication
-- [Node Auth App](backend/packages/node-auth-app/) - Complete auth service
-- [Backend Reference](backend/reference/) - API documentation
+- [Getting Started Guide](../getting-started/) - Learn the basics
+- [Node Better Auth](../packages/node-better-auth/) - Explore authentication
+- [Node Auth App](../packages/node-auth-app/) - Complete auth service
+- [Backend Reference](../reference/) - API documentation
🤖 Prompt for AI Agents
In `@apps/docs/src/content/docs/backend/installation.md` around lines 574 - 579,
In the "Next Steps" list in installation.md the link targets include a leading
"backend/" which causes URLs to resolve to /backend/backend/...; update the four
links inside the Next Steps block—specifically the link targets for Getting
Started, Node Better Auth, Node Auth App, and Backend Reference—by removing the
initial "backend/" prefix so they become relative (e.g. change
"backend/getting-started/" to "getting-started/",
"backend/packages/node-better-auth/" to "packages/node-better-auth/", etc.)
ensuring correct resolution from the current docs path.


## Troubleshooting

Expand Down
87 changes: 47 additions & 40 deletions apps/docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ hero:
file: ../../assets/houston.webp
actions:
- text: Get Started
link: /react/getting-started/
link: react/getting-started/
icon: right-arrow
- text: View on GitHub
link: https://github.com/devx-op/effectify
Expand All @@ -31,7 +31,7 @@ banner:
to follow along with development.
---

import { Card, CardGrid } from '@astrojs/starlight/components';
import { Card, CardGrid } from "@astrojs/starlight/components";

## What is Effectify?

Expand All @@ -43,37 +43,42 @@ Effectify is a comprehensive suite of packages that brings the power of [Effect]
<Card title="React" icon="react">
Effect integration with TanStack Query, comprehensive UI components, and real-time chat functionality for React applications.

[Explore React packages →](/react/)
</Card>
<Card title="SolidJS" icon="seti:sublime">
Reactive Effect integration optimized for SolidJS's fine-grained reactivity system with UI components and chat features.
[Explore React packages →](react/)
</Card>
<Card title="SolidJS" icon="seti:sublime">
Reactive Effect integration optimized for SolidJS's fine-grained reactivity system with UI components and chat features.

[Explore SolidJS packages →](/solid/)
</Card>
<Card title="Node.js Backend" icon="bars">
Authentication services, better-auth integration, and complete backend solutions built with Effect.
[Explore SolidJS packages →](solid/)
</Card>
<Card title="Node.js Backend" icon="bars">
Authentication services, better-auth integration, and complete backend solutions built with Effect.

[Explore Backend packages →](/backend/)
</Card>
<Card title="Universal" icon="puzzle">
Shared domain logic, types, and business rules that work across all platforms and frameworks.
[Explore Backend packages →](backend/)
</Card>
<Card title="Universal" icon="puzzle">
Shared domain logic, types, and business rules that work across all platforms and frameworks.

[Explore Universal packages →](universal/)
</Card>

[Explore Universal packages →](/universal/)
</Card>
</CardGrid>

## Key Features

### Type Safety First

Every package is built with TypeScript and Effect's powerful type system, providing compile-time guarantees and excellent IDE support.

### Composable Architecture

Build complex applications from simple, composable parts using Effect's functional programming patterns.

### Error Handling

Robust error handling with Effect's error management system, making your applications more reliable and easier to debug.

### Cross-Platform Consistency

Share business logic and types across React, SolidJS, and Node.js applications for consistent behavior.

## Quick Start
Expand All @@ -86,22 +91,23 @@ Choose your platform to get started:
npm install @effectify/react-query @tanstack/react-query effect
```

[React Quick Start →](/react/getting-started/)
</Card>
<Card title="SolidJS Application" icon="seti:sublime">
```bash
npm install @effectify/solid-query @tanstack/solid-query effect
```
[React Quick Start →](react/getting-started/)
</Card>
<Card title="SolidJS Application" icon="seti:sublime">
```bash
npm install @effectify/solid-query @tanstack/solid-query effect
```

[SolidJS Quick Start →](/solid/getting-started/)
</Card>
<Card title="Node.js Backend" icon="bars">
```bash
npm install @effectify/node-better-auth better-auth effect
```
[SolidJS Quick Start →](solid/getting-started/)
</Card>
<Card title="Node.js Backend" icon="bars">
```bash
npm install @effectify/node-better-auth better-auth effect
```

[Backend Quick Start →](backend/getting-started/)
</Card>

[Backend Quick Start →](/backend/getting-started/)
</Card>
</CardGrid>

## Example Applications
Expand All @@ -119,18 +125,19 @@ Explore complete example applications built with Effectify:
<Card title="GitHub" icon="github">
View source code, report issues, and contribute to the project.

[Visit GitHub →](https://github.com/devx-op/effectify)
</Card>
<Card title="Discussions" icon="comment">
Join the community discussions, ask questions, and share your projects.
[Visit GitHub →](https://github.com/devx-op/effectify)
</Card>
<Card title="Discussions" icon="comment">
Join the community discussions, ask questions, and share your projects.

[Join Discussions →](https://github.com/devx-op/effectify/discussions)
</Card>
<Card title="Effect Discord" icon="discord">
Connect with the broader Effect community for support and collaboration.

[Join Discussions →](https://github.com/devx-op/effectify/discussions)
</Card>
<Card title="Effect Discord" icon="discord">
Connect with the broader Effect community for support and collaboration.
[Join Discord →](https://discord.gg/effect-ts)
</Card>

[Join Discord →](https://discord.gg/effect-ts)
</Card>
</CardGrid>

## Deployment Verification
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/react/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export function UserProfile({ userId }: UserProfileProps) {

Now that you have the basics set up, explore the specific packages:

- [React Query Integration](/react/packages/react-query/) - Learn advanced patterns for data fetching
- [UI Components](/react/packages/react-ui/) - Explore the component library
- [Chat Components](/react/packages/chat-react/) - Add real-time features
- [React Query Integration](react/packages/react-query/) - Learn advanced patterns for data fetching
- [UI Components](react/packages/react-ui/) - Explore the component library
- [Chat Components](react/packages/chat-react/) - Add real-time features

## Common Patterns

Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/content/docs/react/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ Effectify provides powerful React integrations that combine the type-safety and
<Card title="@effectify/react-query" icon="react">
Effect integration with TanStack Query for React applications. Provides type-safe data fetching with Effect's error handling.

[Learn more →](/react/packages/react-query/)
[Learn more →](react/packages/react-query/)
</Card>

<Card title="@effectify/react-ui" icon="puzzle">
A comprehensive UI component library built with React, Radix UI, and Tailwind CSS. Includes forms, layouts, and interactive components.

[Learn more →](/react/packages/react-ui/)
[Learn more →](react/packages/react-ui/)
</Card>

<Card title="@effectify/chat-react" icon="comment">
Real-time chat components and services for React applications. Built with Effect for robust state management and error handling.

[Learn more →](/react/packages/chat-react/)
[Learn more →](react/packages/chat-react/)
</Card>
</CardGrid>

Expand All @@ -38,7 +38,7 @@ Ready to start building with Effectify and React? Check out our getting started
<Card title="Quick Start" icon="rocket">
Get up and running with Effectify in your React application in minutes.

[Get Started →](/react/getting-started/)
[Get Started →](react/getting-started/)
</Card>

## Key Features
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/react/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,6 @@ If you see "Effectify is working!" rendered, your installation is successful!

## Next Steps

- [Getting Started Guide](/react/getting-started/) - Learn the basics
- [React Query Package](/react/packages/react-query/) - Explore data fetching patterns
- [UI Components](/react/packages/react-ui/) - Browse available components
- [Getting Started Guide](react/getting-started/) - Learn the basics
- [React Query Package](react/packages/react-query/) - Explore data fetching patterns
- [UI Components](react/packages/react-ui/) - Browse available components
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/solid/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ function UserDashboard(props: { userId: number }) {

Now that you have the basics set up, explore the specific packages:

- [Solid Query Integration](/solid/packages/solid-query/) - Learn advanced patterns for data fetching
- [UI Components](/solid/packages/solid-ui/) - Explore the component library
- [Chat Components](/solid/packages/chat-solid/) - Add real-time features
- [Solid Query Integration](solid/packages/solid-query/) - Learn advanced patterns for data fetching
- [UI Components](solid/packages/solid-ui/) - Explore the component library
- [Chat Components](solid/packages/chat-solid/) - Add real-time features

## Common Patterns

Expand Down
Loading