Skip to content

Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.

Notifications You must be signed in to change notification settings

adityanandanx/kalam2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Kalam2

Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.

Python FastAPI Next.js License: MIT

Kalam3 Screenshot

Features

  • Generate realistic handwriting in multiple styles
  • Download handwriting as SVG (including A4 page layout)
  • Customizable style, color, and layout options
  • API endpoints for integration

Kalam3 Screenshot


Backend (FastAPI)

Setup

  1. Install uv
  2. Install dependencies and activate virtual environment:
    uv sync
    source .venv/bin/activate
  3. Start the backend server:
    python main.py
    The API will be available at http://localhost:8000/api/v1.

Main Endpoints

  • POST /api/v1/handwriting/generate — Generate handwriting from text lines
  • POST /api/v1/handwriting/a4page — Generate handwriting formatted for A4 pages
  • GET /api/v1/handwriting/styles — List available handwriting styles
  • GET /api/v1/handwriting/styles/{style_id} — Get details and preview for a style

Frontend (Next.js)

Setup

  1. Install Node.js.
  2. Install dependencies:
    pnpm install
    # or
    npm install
  3. Start the development server:
    pnpm dev
    # or
    npm run dev
    The app will be available at http://localhost:3000.

Usage

  • Enter text and select a handwriting style to generate handwriting.
  • Use the A4 page generator for multi-page output.
  • Download generated SVGs for use in documents or printing.

Deployment

  • The frontend can be deployed on Vercel or any static hosting supporting Next.js.
  • The backend can be deployed on any server supporting Python and FastAPI.

License

MIT License


Acknowledgements

About

Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.

Topics

Resources

Stars

Watchers

Forks