Swarms logo

Vault Mode

Holders only

This agent โ€” CareToken AI is gated. Hold $CARETOKEN to unlock the full agent.

CareToken AI

AI-powered healthcare recovery funding agent for Swarms Marketplace # CareToken AI ๐Ÿฅ๐Ÿช™ > AI-powered healthcare funding through tokenization. > Swarms Marketplace compatible ยท Frenzy Mode enabled ยท One-click Vercel deploy. --- ## What it does CareToken AI transforms patient recovery stories into transparent, AI-generated funding campaigns. Enter basic patient info and the agent produces: - Plain-language **medical summary** - Phase-by-phase **recovery milestones** - **Funding allocation** explanation - **Swarms Marketplace** campaign listing - **Frenzy Mode** token utility description --- ## Tech Stack | Layer | Tech | |---|---| | Framework | Next.js 14 (App Router) | | Language | TypeScript | | Styling | Tailwind CSS + custom CSS vars | | AI | OpenAI GPT-4o (server-side only) | | Deploy | Vercel | | Marketplace | Swarms | --- ## Local Setup ### 1. Clone & install ```bash git clone https://github.com/YOUR_USERNAME/caretoken-ai.git cd caretoken-ai npm install ``` ### 2. Set up environment variables ```bash cp .env.local.example .env.local ``` Open `.env.local` and add your key: ``` OPENAI_API_KEY=sk-... ``` > โš ๏ธ Never commit `.env.local`. It's already in `.gitignore`. ### 3. Run locally ```bash npm run dev ``` Open [http://localhost:3000](http://localhost:3000) --- ## Project Structure ``` caretoken-ai/ โ”œโ”€โ”€ app/ โ”‚ โ”œโ”€โ”€ layout.tsx # Root layout + Nav โ”‚ โ”œโ”€โ”€ globals.css # Design system โ”‚ โ”œโ”€โ”€ page.tsx # Landing page โ”‚ โ”œโ”€โ”€ create/ โ”‚ โ”‚ โ””โ”€โ”€ page.tsx # Campaign form โ”‚ โ”œโ”€โ”€ results/ โ”‚ โ”‚ โ””โ”€โ”€ page.tsx # AI results display โ”‚ โ””โ”€โ”€ api/ โ”‚ โ””โ”€โ”€ generate-profile/ โ”‚ โ””โ”€โ”€ route.ts # โ† API route (uses OPENAI_API_KEY) โ”œโ”€โ”€ components/ โ”‚ โ””โ”€โ”€ Nav.tsx โ”œโ”€โ”€ lib/ โ”‚ โ””โ”€โ”€ caretoken-agent.ts # Agent metadata + types + runner โ”œโ”€โ”€ .env.local.example โ”œโ”€โ”€ .gitignore โ”œโ”€โ”€ next.config.ts โ”œโ”€โ”€ tailwind.config.ts โ”œโ”€โ”€ tsconfig.json โ””โ”€โ”€ package.json ``` > **Security**: `OPENAI_API_KEY` is only used in `app/api/generate-profile/route.ts`. > It is never sent to or accessible from the browser. --- ## Vercel Deployment ### 1. Push to GitHub ```bash git init git add . git commit -m "feat: initial CareToken AI" git remote add origin https://github.com/YOUR_USERNAME/caretoken-ai.git git push -u origin main ``` ### 2. Import on Vercel 1. Go to [vercel.com](https://vercel.com) โ†’ **New Project** 2. Import your GitHub repository 3. Framework: **Next.js** (auto-detected) ### 3. Add environment variable In Vercel dashboard โ†’ **Project โ†’ Settings โ†’ Environment Variables**: | Name | Value | |---|---| | `OPENAI_API_KEY` | `sk-...` | ### 4. Deploy Click **Deploy**. Vercel builds and publishes automatically. You'll receive a `*.vercel.app` URL. --- ## Swarms Marketplace Integration ### 1. Register your agent - Go to [swarms.world](https://swarms.world) - Create a new agent listing ### 2. Paste agent metadata The metadata is in `lib/caretoken-agent.ts` โ†’ `caretokenAgentMetadata`. The API route also returns per-campaign metadata in `agentMetadata`. Key flags: ```json { "tokenizable": true, "frenzyMode": true, "category": "healthcare" } ``` ### 3. Set your API endpoint ``` POST https://your-app.vercel.app/api/generate-profile ``` ### 4. Marketplace listing text The full listing copy is exported from `lib/caretoken-agent.ts` โ†’ `swarmsMarketplaceListing`. --- ## API Reference ### `POST /api/generate-profile` **Request body:** ```json { "nickname": "Alex", "age": "34", "condition": "Stage 2 Kidney Disease", "symptoms": "Chronic fatigue, swelling, reduced kidney function", "treatment": "Dialysis 3x/week, transplant evaluation", "fundingGoal": "45000", "notes": "Optional additional context" } ``` **Response:** ```json { "medicalSummary": "...", "recoveryMilestones": [ { "phase": "...", "timeframe": "...", "goal": "...", "icon": "๐Ÿ’Š" } ], "fundingSummary": "...", "swarmsCampaignSummary": "...", "tokenUtilitySummary": "...", "agentMetadata": { ... } } ``` --- ## License MIT โ€” built for the Swarms ACM Hackathon. Source: https://github.com/Mosopzy22/Healthcare-Token

Rating
No ratings yet
Your balance
Wallet not connected
Token
3Ernhkโ€ฆRaswrm

Buy $CARETOKEN

SOL
You receive0 CARETOKEN
Open on Axiom

You must hold at least $1 worth of this token to unlock vaulted content.

Loading recommendations...