Skip to content

Repository files navigation

HR Zen — Frontend

Next.js (App Router) + React 19 + Tailwind v4 frontend for the HR Zen Rails API.

Screenshots

Screenshot 2026-09-29 at 7 14 35 AM Screenshot 2026-09-29 at 7 15 40 AM Screenshot 2026-09-29 at 7 16 05 AM Screenshot 2026-09-29 at 7 16 10 AM Screenshot 2026-09-29 at 7 16 15 AM Screenshot 2026-09-29 at 7 16 18 AM Screenshot 2026-09-29 at 7 16 25 AM Screenshot 2026-09-29 at 7 16 29 AM Screenshot 2026-09-29 at 7 17 10 AM Screenshot 2026-09-29 at 7 17 15 AM Screenshot 2026-09-29 at 7 17 19 AM Screenshot 2026-09-29 at 7 17 23 AM Screenshot 2026-09-29 at 7 17 45 AM Screenshot 2026-09-29 at 7 17 49 AM Screenshot 2026-09-29 at 7 17 54 AM Screenshot 2026-09-29 at 7 17 57 AM Screenshot 2026-09-29 at 7 18 12 AM Screenshot 2026-09-29 at 7 18 17 AM Screenshot 2026-09-29 at 7 18 21 AM Screenshot 2026-09-29 at 7 18 25 AM Screenshot 2026-09-29 at 7 18 28 AM Screenshot 2026-09-29 at 7 18 31 AM Screenshot 2026-09-29 at 7 18 34 AM Screenshot 2026-09-29 at 7 18 37 AM Screenshot 2026-09-29 at 7 18 44 AM Screenshot 2026-09-29 at 7 18 52 AM Screenshot 2026-09-29 at 7 18 56 AM Screenshot 2026-09-29 at 7 19 28 AM Screenshot 2026-09-29 at 7 19 34 AM

Stack

Concern Choice
Framework Next.js App Router (src/app)
UI shadcn/ui (new-york) + Radix + Tailwind v4 (CSS-first)
Forms react-hook-form + zod
State zustand
Icons lucide-react + @tabler/icons-react
Toast sonner
Theme next-themes (.dark class, dark default)

Layout of src/

app/
  (auth)/            # public: sign-in, sign-up (split-screen layout)
  (app)/             # authenticated shell: sidebar + header
components/
  ui/                # shadcn primitives (vendored verbatim)
  *.tsx              # app-wide components (sidebar, nav, theme)
constants/           # routes, env, response messages
hooks/               # use-mobile, ...
lib/                 # api client, serializers, validations, utils
store/               # zustand stores (auth, sign-up, ui)
types/               # shared, "I"-prefixed types

Conventions

  • Path alias @/* → src/*.
  • Import order enforced by simple-import-sort: React/Next → third-party → @/components/ui → @/constants → @/store → other @/* → relative.
  • One zustand store per domain in src/store/; read with selectors and useStore.getState() inside async callbacks.
  • All API calls go through src/lib/api.ts (apiRequest), which unwraps the Rails envelope { success, data, meta } and throws ApiError with field details.
  • API payloads are snake_case; map to camelCase with src/lib/serializers.ts.
  • zod schemas in src/lib/validations/ mirror the Rails validations.

Scripts

pnpm dev        # start dev server (http://localhost:3100)
pnpm build      # production build
pnpm lint       # eslint --max-warnings 0
pnpm typecheck  # tsc --noEmit

Env

.env.local (copy .env.example):

NEXT_PUBLIC_API_URL=http://localhost:3001/api/v1

Backend

Rails API lives in ../hr_zen_be. The frontend calls:

  • POST /api/v1/sign_up — create workspace
  • POST /api/v1/sign_in — returns { user, organization, token }
  • GET /api/v1/users/me — current user (Bearer token)

Roadmap

  • Persist + attach the JWT on authenticated requests (store has token).
  • Email verification screen + resend.
  • Dashboard widgets, employees, roles/permissions (Auth Matrix) UI.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages