Skip to content

ikascom/ikas-app-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ikas App Examples

A collection of example applications and starter templates for building ikas Admin apps. These examples demonstrate best practices, common patterns, and integrations for developing apps within the ikas ecosystem.

🚀 Available Examples

Starter App - Next.js 15 Full-Stack Template

Modern Next.js 15 App Router starter for building ikas Admin apps

Features:

  • ⚛️ Next.js 15 + App Router with React 19 and TypeScript
  • 🔐 OAuth for ikas - Complete end-to-end authorization flow
  • 📡 Admin GraphQL client - @ikas/admin-api-client with code generation
  • 🗃️ Prisma - Local development database for token storage
  • 🎨 Tailwind CSS v4 + shadcn/ui - Modern component library
  • 🔒 Iron Session - Secure server-side session management
  • 🌉 Frontend ↔ Backend bridge - Typed API helpers and authentication

Perfect for: Full-stack ikas apps requiring authentication, database storage, and modern UI components.

Get Started →

🛠️ Quick Start

Prerequisites

  • Node.js 18+ (LTS recommended)
  • pnpm (preferred) or npm/yarn
  • ikas Developer Account with app credentials

Getting Started

  1. Clone the repository

    git clone https://github.com/ikascom/ikas-app-examples.git
    cd ikas-app-examples
  2. Choose an example

    cd examples/starter-app  # or any other example
  3. Follow the example's README

    Each example includes detailed setup instructions, configuration guides, and usage examples.

📖 What You'll Learn

These examples cover essential patterns for ikas app development:

  • Authentication & OAuth - Secure user authorization flows
  • GraphQL Integration - Type-safe API interactions with code generation
  • Token Management - Secure storage and refresh patterns
  • Session Handling - Server-side session management
  • UI Components - Modern, accessible interfaces with Tailwind + shadcn/ui
  • Database Integration - Local development with Prisma
  • Security Best Practices - Token security, session management, and API protection

🏗️ Architecture Overview

All examples follow these core principles:

  • Type Safety First - TypeScript throughout with strict configuration
  • Security by Default - Never expose tokens, secure session management
  • Developer Experience - Hot reload, code generation, modern tooling
  • Production Ready - Optimized builds, proper error handling
  • ikas Standards - Consistent with ikas platform conventions

🔧 Common Setup Requirements

Most examples require these environment variables:

# ikas Configuration
NEXT_PUBLIC_GRAPH_API_URL=https://api.myikas.com/api/v2/admin/graphql
NEXT_PUBLIC_ADMIN_URL=https://{storeName}.myikas.com/admin
NEXT_PUBLIC_CLIENT_ID=your_ikas_app_client_id
CLIENT_SECRET=your_ikas_app_client_secret
NEXT_PUBLIC_DEPLOY_URL=https://yourapp.example.com

# Session Security
SECRET_COOKIE_PASSWORD=your_long_random_string_for_session_encryption

🧠 Development Workflow

GraphQL Operations

  1. Use ikas MCP tools to discover available operations
  2. Add queries/mutations to graphql-requests.ts
  3. Run code generation: pnpm codegen
  4. Use typed client in your app

UI Components

  1. Use shadcn MCP to discover components
  2. Install via CLI or copy from examples
  3. Customize with Tailwind classes

Authentication Flow

  1. OAuth authorization → token exchange → session storage
  2. JWT for frontend ↔ backend communication
  3. Automatic token refresh with onCheckToken

🤝 Contributing

We welcome contributions! Please follow these guidelines:

Commit Message Format

Use Conventional Commits format:

<type>(<scope>): <short summary>

Examples:
feat(starter): add user profile component
fix(auth): prevent token refresh loop
docs(readme): update installation guide

Code Standards

  • TypeScript strict mode - No any types
  • ESLint + Prettier - Consistent formatting
  • Type safety - Prefer generated types over manual definitions
  • Security first - Never log tokens or secrets

Adding New Examples

  1. Create new directory under examples/
  2. Include comprehensive README with setup instructions
  3. Follow existing patterns for configuration and structure
  4. Update this main README with new example details

📚 Additional Resources

📝 License

MIT

🐛 Issues & Support


Happy coding! 🚀 Build amazing ikas apps with these examples as your foundation.

About

ikas App Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published