Skip to content

djantche/object-test-frontend

Repository files navigation

Objects Frontend

Minimal Next.js (App Router) + shadcn/ui frontend for an existing objects REST API and Socket.IO events.

Routes

  • / list all objects
  • /create create a new object
  • /object/[id] object details

API and socket configuration

Create a .env.local file:

NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_SOCKET_URL=http://localhost:3001

If NEXT_PUBLIC_SOCKET_URL is not set, the app falls back to NEXT_PUBLIC_API_URL.

Development

pnpm install
pnpm dev

Open http://localhost:3000.

Realtime behavior

On the list page (/), Socket.IO events update UI automatically:

  • object_created adds/updates a card
  • object_deleted removes the card

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors