Quickstart Guide
Welcome to Jaseci Forge! This guide will help you get started quickly.
Getting Started
Architecture Overview
Learn about our Architecture and how different layers work together.
Best Practices
Check out our Best Practices guide for tips on building robust applications.
Next Steps
After completing the quickstart, you can:
- Explore more advanced features
- Build custom modules
- Contribute to the project
Basic Commands
Create a New Project
# Create a new project
npx create-jaseci-app my-app
# Navigate to project directory
cd my-app
Clean Up Example App
# Remove the example task manager app and its related files
npx create-jaseci-app cleanup
This command will:
- Remove the example task manager module
- Remove example task manager files
- Create a clean home page
- Clean up store configuration
Start Development Server
# Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
Your application will be available at http://localhost:3000
Common Workflows
1. Creating a New Module
# Basic module creation
npx create-jaseci-app add-module products
# Module with custom node
npx create-jaseci-app add-module inventory --node=Product
# Module with custom route
npx create-jaseci-app add-module users --path=dashboard/users
2. Working with Nodes
# Create a node with basic fields
npx create-jaseci-app add-module post --node-type="id:string,title:string,status:active|pending|completed"
# Create a node with optional fields
npx create-jaseci-app add-module products --node-type="id:string,name:string,description:string?,price:number"
3. Setting Up Authentication
- Enable authentication in
.env.local
:
NEXT_PUBLIC_AUTH_ENABLED=true
NEXT_PUBLIC_AUTH_PROVIDER=local
- Create an auth module:
npx create-jaseci-app add-module auth --path="(auth)" --auth=no
4. Adding API Integration
- Configure your API URL in
.env.local
:
NEXT_PUBLIC_API_URL=http://localhost:8000
- Create a module with API endpoints:
npx create-jaseci-app add-module products --apis="list,get,create,update,delete"
Project Structure
my-app/
├── app/ # Next.js app directory
├── modules/ # Feature modules
├── ds/ # Design system components
├── nodes/ # Node definitions
└── store/ # Redux store
Common Tasks
Adding a New Page
- Create a new module:
npx create-jaseci-app add-module dashboard --path=dashboard
- The page will be available at
/dashboard
Adding State Management
- Create a module with Redux slice:
npx create-jaseci-app add-module products
- Use the generated hooks in your components:
import { useProducts } from '@/modules/products/hooks/useProducts';
function MyComponent() {
const { products, isLoading, error } = useProducts();
// ...
}
Adding Form Validation
- Create a module with Zod schema:
npx create-jaseci-app add-module products --node-type="id:string,name:string,price:number"
- Use the generated schema in your forms:
import { productSchema } from '@/modules/products/schemas/productSchema';
// Validate form data
const result = productSchema.safeParse(formData);