Skip to main content

Create App

The create-app command is used to generate a new JaseciStack project.

Usage

npx create-jaseci-app my-app

Options

  • --storybook: Include Storybook setup
  • --testing: Include React Testing Library setup
  • Package manager selection (npm/yarn/pnpm)

What it Does

This command creates a new JaseciStack project with:

  • Next.js setup with TypeScript
  • Redux Toolkit for state management
  • Tailwind CSS for styling
  • ESLint and Prettier for code quality
  • Jest and React Testing Library for testing
  • Storybook for component development (optional)
  • Example task manager module
  • Authentication setup
  • Protected routes
  • API integration

Example

# Create a new project with default settings
npx create-jaseci-app my-app

# Create a project with Storybook
npx create-jaseci-app my-app --storybook

# Create a project with testing setup
npx create-jaseci-app my-app --testing

Next Steps

After creating your project:

  1. Navigate to the project directory:

    cd my-app
  2. Install dependencies:

    npm install
    # or
    yarn
    # or
    pnpm install
  3. Start the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev

Project Structure

The generated project follows a modular structure:

my-app/
├── src/
│ ├── app/ # Next.js app directory
│ ├── components/ # Shared components
│ ├── modules/ # Feature modules
│ ├── store/ # Redux store configuration
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
└── tests/ # Test files

Best Practices

  1. Module Organization

    • Keep related code together in modules
    • Use clear, descriptive module names
    • Follow the established module structure
  2. Component Development

    • Create reusable components
    • Use TypeScript for type safety
    • Write tests for critical components
  3. State Management

    • Use Redux Toolkit for global state
    • Keep state minimal and normalized
    • Use local state when appropriate

Troubleshooting

Common Issues

  1. Installation Fails

    • Check Node.js version (v18 or later required)
    • Ensure you have write permissions
    • Clear npm cache if needed
  2. Dependencies Issues

    • Delete node_modules and reinstall
    • Check for conflicting dependencies
    • Update package manager

Getting Help

If you encounter any issues:

  1. Check the documentation
  2. Search existing issues
  3. Create a new issue if needed