Skip to content

sallf/world-traffic-light

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This workspace has been generated by Nx, Smart Monorepos · Fast CI.

Getting started

Run npm install before first start.

Run nx dev to start the development server. Happy coding!

Run nx build to build the application. The build artifacts are stored in the output directory (e.g. dist/ or build/), ready to be deployed.

Repo notes

Main stack

Folder structure

libs (components and functions)
├── app (feature components)
├── hooks
├── shared (ui components)
└── utils (shared functions and data)
src (root for App Router)
└── app
    ├── api (endpoints)
    ├── app (app screen)
    └── login (login screen)

Code notes

  • When logging in, username is stored as a cookie on the server.
  • Pages and routes are organized via the App Router structure (nextjs 13+).
  • Users can only edit and delete their own posts. This is checked against the user's username, and enforced by not showing the necessary ui elements.
  • Click on any country to see its product/country score (defaults to 50).
  • Toggle through the products at the bottom of the map screen or from the dropdown in the score modal.

More from NX

Explore CI!

Nx comes with local caching already built-in (check your nx.json). On CI you might want to go a step further.

Explore the project graph

Run npx nx graph to show the graph of the workspace. It will show tasks that you can run with Nx.

Connect with us!