Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new React frontend challenge #39

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

matteomrz
Copy link

Added cloudflare worker for creating jwt's for future react frontend challenge.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 14, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 23d1118
Status:🚫  Build failed.

View logs

@matteomrz matteomrz requested a review from stephanLe September 14, 2023 13:48
3. Delete a project
4. Display all projects
5. Create a new task for an existing project with a project_id, name, description and status. The status is set to OPEN by default.
6. Edit name, description and status of a task
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are two separate functionalities - edit the name & description (most likely in some kind of edit dialog) and change the status (drag & drop in a Kanban board).


## What has already been implemented for you ✅

The backend uses Hasura to create an API, Postgres as a database,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an architecture diagram to visualize this.

GraphQL for the requests and Cloudflare workers to generate JWTs (https://jwt.io/introduction) needed for authorization.


Each project is exclusively mapped to a single user through their email-address. By that, the respective tasks are restricted to the creator of the project as well.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment that therefore, users cannot access tasks of other users.

This token has to be included in the request header of each GraphQL query/mutation. Else, access will be denied. 😈

The requests have to be sent to this URL: https://react-challenge.deploy.selectcode.dev/v1/graphql.
One of the header titles of each request must be set to "Authorization" and the value to "Bearer < JWT > ".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the example for test@selectcode.de.


export default {

async fetch(request: Request) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more documentation - how does an example JWT look at the end? How is the format of the input parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants