Everything you need to build on the Hasanat platform — what you get, how to start, resources, and technical docs
What You Get
Free, ready-made infrastructure so you can focus on building your idea instead of setting up servers.
Free Hosting
Cloudflare Pages + .hasanat.dev subdomain
Shared Auth
auth.hasanat.dev works across all apps
Database
Cloudflare D1 — fast, lightweight SQL
Email
Resend with verified hasanat.dev domain
Community & Testers
Real feedback and volunteer testers
Launch & Distribution
Featured on platform and newsletter
How to Start
1
Pick an Idea
Browse community ideas or propose your own
2
Start Building
Clone the starter template from github.com/hasanat-dev/starter
3
Submit Your App
Submit your app and get your hasanat.dev subdomain
4
Launch to Community
We announce your app on the platform and newsletter
From idea to a running page in minutes
The hasanat-builder skill gives your coding agent a disciplined path: shape one small first outcome with you, clone the official starter, run it locally, and verify the page before adding auth, a database, or deployment.
1
Review the source
Read the skill instructions before giving them to your agent.
2
Install the skill
One command adds it to supported coding agents.
3
Use the starter prompt
Copy it as-is; the agent starts by asking what you want to build.
Copy this prompt exactly as shown and paste it into your coding agent. It starts by asking what you want to build, so there is nothing to customize.
Help me start a small working Hasanat project.
Begin by asking me what I want to build. Do not ask me to rewrite or customize this prompt. After I answer, ask at most two short follow-up questions only if needed to identify:
- who the first version is for and what problem it solves;
- the one useful action the first local page should support.
Then summarize the first milestone in one sentence and continue without waiting for me to prepare a formal brief.
First, check whether the hasanat-builder skill is available. If it is not:
1. Download the validated bundle from https://hasanat.dev/skills/hasanat-builder.skill to a temporary directory.
2. Show me its file listing with unzip -l and briefly explain that skills are instructions and scripts the coding agent will follow.
3. Ask for approval before installing it. Do not overwrite an existing skill directory.
4. After approval, create .agents/skills in the current project and extract the bundle there:
mkdir -p .agents/skills
unzip <temporary-path>/hasanat-builder.skill -d .agents/skills
Then load and follow hasanat-builder.
Keep the first milestone strict: define one useful first-page outcome, clone the public official Hasanat starter over HTTPS into a new folder, install its locked dependencies, copy .env.example, start the dev server, and verify the page in a browser. Do not require GitHub login, OAuth credentials, D1, deployment, or secrets before I can see something working locally. Continue shaping and implementing the idea with me after that checkpoint.
Start with the official template and get the page running locally first, then add the React 19, Tailwind CSS v4, and Cloudflare capabilities your project needs.
1Build your app using any of the tools above (or any other tool)
2Deploy your app anywhere — Replit has built-in hosting, or use Vercel, Netlify, or any platform
3 Submit your app at hasanat.dev/apps — choose "External hosting" and enter your site URL
4Get a .hasanat.dev subdomain pointing to your site
Tip: App builders are great for simple projects. If you need advanced features (shared auth, D1 database), you can switch to the starter template later.
Authentication
auth.hasanat.dev provides unified authentication across all Hasanat apps. Supports Google and GitHub.
Shared Cookie Mode (Cloudflare Apps)
If your app is hosted on Cloudflare Pages under .hasanat.dev, the user signs in once and the cookie works automatically.
export async functiononRequest(context, next) { const user = await verifySession(context.request); context.locals.user = user; // null if not logged in return next(); }
Access Current User
// In any .astro page or API route const user = (Astro.locals as any).user;
if (user) { console.log(user.id); // unique user ID console.log(user.name); // display name console.log(user.email); // email console.log(user.image); // avatar URL }
Protected Routes
// src/pages/api/my-data.ts export constGET: APIRoute = async ({ locals }) => { const user = (locals as any).user; if (!user) return new Response("Unauthorized", { status: 401 });
// user is authenticated, proceed... };
Login Button
<!-- Redirect to auth.hasanat.dev -->
<ahref="https://auth.hasanat.dev/api/auth/signin"> Sign In
</a>
Database
Cloudflare D1 — SQLite at the edge. Fast, free, and ready to use.
// Query const { results } = await db .prepare("SELECT * FROM items WHERE user_id = ?") .bind(userId) .all();
// Insert await db .prepare("INSERT INTO items (name, user_id) VALUES (?, ?)") .bind(name, userId) .run();
Schema Conventions
CREATE TABLE items ( id INTEGER PRIMARY KEY AUTOINCREMENT, name_ar TEXT NOT NULL, -- Arabic name name_en TEXT, -- English (optional) user_id TEXT, -- from auth session status TEXT DEFAULT'active', created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
Use bilingual columns (name_ar + name_en) for any user-facing text.
Open your project's workspace and go to the Feedback panel to see everything users send. You'll also find the ready-to-copy embed snippet there, pre-filled with your project ID.