Frontend Route Design

Sep 27, 2019 · 1 min read · 99 Words · -Views -Comments

As the team grew, route design became chaotic. So we decided to think about it, reach a consensus with team members, and form a set of rules for everyone to follow when naming routes.

Thus, this article came into being. Here are the rules. Welcome to comment and exchange ideas.

Principles

  • as short as possible
  • easy to read
  • user-friendly input when the user enters the URL

Examples

User list

/users

User detail

/user/:id

Add user

/user/new

User’s functional page

/user/:id/tel

References

Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover