Start with a clear need and one outcome. Build a first version, test it with people, then organize operation and improvement.
Jump to a section ⌄
What Hasanat provides
Use the shared foundation instead of rebuilding accounts, services, and tools for every project.
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
Start with one outcome
1
Name the need
Choose a community need or write one you know
2
Build a first version
Clone the starter template from github.com/hasanat-dev/starter
3
Bring the project in
Open its workspace and name the lead and next task
4
Test and operate
Put it in front of users, then act on their feedback
From a clear brief to a working page
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 all five Hasanat skills are available: hasanat-builder, hasanat-auth, hasanat-d1, hasanat-design, and hasanat-deploy. If any are missing:
1. Download the validated complete pack, manifest, and verifier from https://hasanat.dev/skills/ to a temporary directory: hasanat-skills.skill, hasanat-skills.manifest.json, and verify-hasanat-skills.mjs.
2. Run node verify-hasanat-skills.mjs hasanat-skills.skill hasanat-skills.manifest.json. Do not install the pack if verification fails. Then show me its file listing with unzip -l and confirm that it contains one directory for each of the five skills. Briefly explain that skills are instructions and scripts the coding agent will follow.
3. Ask once for approval to install the missing skills. Do not overwrite any existing skill directory.
4. After approval, create .agents/skills in the current project and extract the pack there:
mkdir -p .agents/skills
unzip -n <temporary-path>/hasanat-skills.skill -d .agents/skills
Then load and follow hasanat-builder, loading the companion skills only when you reach authentication, database, design, or deployment work.
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.
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.