A complete authentication system with login and registration functionality built with React and Hono.
āāā backend/
ā āāā index.ts # Hono API server with auth endpoints
āāā frontend/
ā āāā index.html # Main HTML template
ā āāā index.tsx # React app entry point
ā āāā components/
ā āāā App.tsx # Main app component
ā āāā LoginForm.tsx # Login/registration form
ā āāā Dashboard.tsx # Protected dashboard
āāā main.tsx # HTTP trigger entry point
āāā README.md
POST /api/login - Authenticate userPOST /api/register - Create new user accountPOST /api/logout - End user sessionGET /api/auth - Check authentication statusThe app uses SQLite with a simple users table:
CREATE TABLE login_users_1 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);