Open manwar opened 7 months ago
Hello @manwar 👋
From how things are structured on the website theweeklychallenge.org
, I think we need the following routes:
/team
(GET) -> returns team UI template with TeamList
data/about
(GET) -> returns about page template/chart
(GET)-> returns chart UI template/user
(GET, POST) -> retrieves or creates a user ( a user can be a contributor, a champion or a guest)/faqs
(GET, POST) -> Returns faq page with faqList
data/members
(GET, POST) -> Returns the members page and membersList
data/perl-review
(GET) -> returns perl reviews page and reviewsList
data/raku-review
(GET) -> returns Raku reviews page and reviewsList
dataHi @manwar
Are there other necessary routes that I missed ? Or routes that are not really required on this list?
I would like your feedback. Thanks!
@baimamboukar please add a document explaining each route and its input and output.
@baimamboukar You could check this: https://swagger.io/resources/articles/best-practices-in-api-design/ and https://docs.swagger.io/spec.html
@baimamboukar please add a document explaining each route and its input and output.
Alright @manwar. I'm on it ✨
@baimamboukar You could check this: https://swagger.io/resources/articles/best-practices-in-api-design/
Thanks for the ressources @manwar. I really appreciate it 🙏
These are some great suggestions by @baimamboukar 👏🏻
@manwar Here are a few additional suggestions that I have considering we'll be having login/signup routes as well:
/user
route could potentially handle both user creation (signup) and retrieval (login) depending on the POST request data. We can consider separating these functionalities into dedicated /signup
and /login
routes for better clarity./logout
route which itself doesn't display anything in the browser but handles the server-side logic of invalidating the user's session. After session invalidation, the user can be redirected to another page either the home page or the login page. We can also maybe add a confirmation page displaying a "successfully logged out" message. Let me know what you think about this @manwar!
@ayushichoudhary-19 If you are actually coding then think of bigger picture and create library that can be used inside Dancer2 web framework and managed by unit test independently.
These are some great suggestions by @baimamboukar 👏🏻
@manwar Here are a few additional suggestions that I have considering we'll be having login/signup routes as well:
- We might want to restrict access to certain routes only to logged-in users. We can achieve this by checking the user's session status within those routes and redirecting them to login if not authenticated.
- The
/user
route could potentially handle both user creation (signup) and retrieval (login) depending on the POST request data. We can consider separating these functionalities into dedicated/signup
and/login
routes for better clarity.- Additionally, we can also have a
/logout
route which itself doesn't display anything in the browser but handles the server-side logic of invalidating the user's session. After session invalidation, the user can be redirected to another page either the home page or the login page. We can also maybe add a confirmation page displaying a "successfully logged out" message.
Thanks very much @ayushichoudhary-19 ✨ I have taken note of all these information. I will update what I'm doing accordingly 🫡
@manwar I would like to be assigned this issue, please!
Hello @manwar
This is ready for review https://github.com/ChallengeForge/TheWeeklyChallenge/pull/4
Discuss the needed route for the new REST API to support existing feature and future request.