@caprogramacion/fast
v0.1.10
Published
The ultimate orchestrator for fullstack TypeScript projects. Spin up your dev environment, load `.env` variables, and compile everything for production into a single ready-to-deploy folder.
Downloads
111
Readme
Fast
The ultimate orchestrator for fullstack TypeScript projects. Spin up your dev environment, load .env variables, and compile everything for production into a single ready-to-deploy folder.
Features
- One-command orchestration: Run frontend and backend concurrently with
fast dev. - Production build: Generate optimized builds for both backend and static frontend under
/distwithfast build. - Built-in environment variables: Auto-loads
.envnatively with zero dependencies. - Batteries included:
- AI integration: Native support for
ai(Vercel SDK),@ai-sdk/google, and@ai-sdk/groq. - Reactive state management: Fast proxies via
valtio. - Scheduling: Automate backend tasks with
node-cron. - Telegram bots: Build bots with
grammy— fast and fully typed. - Validation: Schemas and validation ready to go with
zod.
- AI integration: Native support for
Installation
Add it to your project as a dev dependency:
pnpm add -D @caprogramacion/fastLocal Development (Linking)
If you're developing the framework locally and want to link it to your project:
- In the framework root:
pnpm link --global .- In your project root:
pnpm link --global @caprogramacion/fastRecommended Project Structure
my-project/
├── package.json
├── .env
├── frontend/
│ ├── index.html
│ └── src/
└── server/
└── index.tsSetup
Add these scripts to your project's package.json:
{
"scripts": {
"dev": "fast dev",
"build": "fast build"
}
}Usage
Create a new project
fast init my-projectCreate a project with a GitHub repository
fast init my-project -g myusernameStart the development environment
pnpm devBuild for production
pnpm buildThis generates a /dist folder with /dist/frontend (static HTML/JS/CSS) and /dist/server with your compiled backend TypeScript ready to run with Node.js.
Import in your code
import { z, generateText, google, Bot, type ApiResponse } from "@caprogramacion/fast"
const { text } = await generateText({
model: google("gemini-1.5-flash"),
prompt: "Hello World"
})