Aplikasi full-stack untuk sistem informasi digital posyandu dan psikolog yang dibangun dengan Qwik, NestJS, dan menggunakan modular-forms dengan valibot untuk validasi form yang robust.
- Qwik v1.14.1 - Framework JavaScript modern dengan resumability
- DaisyUI v5 - Component library untuk TailwindCSS
- TailwindCSS v4 - Utility-first CSS framework
- Modular Forms - Form library untuk Qwik dengan validasi yang powerful
- Valibot - Schema validation library yang lightweight dan type-safe
- Axios - HTTP client untuk API calls
- NestJS v11.1.3 - Progressive Node.js framework
- JWT - JSON Web Token untuk authentication
- TypeORM - ORM untuk database
- PostgreSQL - Database
- β Signup untuk Posyandu dan Psikolog
- β Login dengan JWT
- β Forgot Password dengan email reset
- β Reset Password dengan token
- β Profile management
- β Logout
- β Real-time validation dengan Valibot
- β Custom error messages dalam Bahasa Indonesia
- β Password strength validation
- β Email format validation
- β Required field validation
- β Responsive design dengan DaisyUI
- β Loading states
- β Error handling
- β Success messages
- β Conditional navigation berdasarkan login status
- Node.js 18+
- Bun (recommended) atau npm
- PostgreSQL database
cd sidifa-fev2
bun install
bun run devcd backend
npm install
bun start:devsrc/
βββ routes/ # Qwik City routes
β βββ signup-posyandu/ # Signup form untuk posyandu
β βββ signup-psikolog/ # Signup form untuk psikolog
β βββ login/ # Login form
β βββ profile/ # User profile page
β βββ forgot-password/ # Forgot password form
β βββ reset-password/ # Reset password form
β βββ layout.tsx # Main layout dengan navigation
βββ types/
β βββ auth.ts # Valibot schemas dan types
βββ services/
β βββ api.ts # Axios instance dengan interceptors
βββ components/ # Reusable components
import { object, string, email, minLength, regex, pipe } from "valibot";
export const signupPosyanduSchema = object({
name: pipe(string(), minLength(1, "Nama harus diisi")),
email: pipe(string(), email("Email tidak valid")),
password: pipe(
string(),
minLength(8, "Password minimal 8 karakter"),
regex(
/^(?=.*[A-Z])(?=.*\d).+$/,
"Password harus mengandung huruf besar dan angka",
),
),
// ... other fields
});import { useForm, valiForm$ } from "@modular-forms/qwik";
const [form, { Form, Field }] = useForm<SignupPosyanduForm>({
loader: { value: { name: "", email: "", password: "" } },
validate: valiForm$(signupPosyanduSchema),
});- Signup: User mendaftar sebagai Posyandu atau Psikolog
- Login: User login dengan email dan password
- JWT Token: Token disimpan di localStorage
- Protected Routes: Profile page hanya bisa diakses setelah login
- Logout: Token dihapus dari localStorage
- Input fields dengan validasi real-time
- Error messages yang informatif
- Loading states saat submit
- Responsive design
- Conditional navigation berdasarkan login status
- Role-based display (Posyandu/Psikolog)
- Clean dan modern design
Aplikasi menggunakan DaisyUI dan TailwindCSS untuk responsive design yang optimal di berbagai device:
- Desktop
- Tablet
- Mobile
bun run devbun run buildbun run previewUntuk menjalankan tests:
bun run testPOST /auth/signup/kader- Signup posyanduPOST /auth/signup/psikolog- Signup psikologPOST /auth/login- LoginPOST /auth/forgot-password- Forgot passwordPOST /auth/reset-password- Reset passwordGET /auth/profile- Get user profile
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Qwik - For the amazing framework
- Modular Forms - For the powerful form library
- Valibot - For the lightweight validation
- DaisyUI - For the beautiful components
- NestJS - For the robust backend framework
This app has a minimal Bun server implementation. After running a full build, you can preview the build using the command:
bun run serve
Then visit http://localhost:3000/