Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
What did I learned
- CRUD with GraphQL in Server Side and Client Side
- Build up SQLite with
drizzle-orm
- Image Upload with
aws-sdk
- Presigned URL with
aws-sdk
- Drag and Drop with
dnd-kit
Process
1.【FE】 Create Pages and setting styles for front-end:
- setting
tailwind.config.ts
- create components (form/ dropdown/ etc)
- create pages (login/ register/ profile/ etc)
- build up drop and drag component with
dnd-kit
- 【BE】 Create GraphQL schema and mutation for backend:
- create
/api/graphql/schema.ts
- create
/api/graphql/resolver.ts
- create
/api/graphql/route.ts
-- connect graphql to Apollo Server - 【FE】setup client side
@urql/next
- 【BE】 Create schema for database and connect to TURSO with
dirzzle-orm
: > Detail to the topic: https://orm.drizzle.team/learn/tutorials/drizzle-with-turso
- create
/api/db/index.ts
- create
/api/db/schema.ts
then run:
npm run db:gen
npm run db:push
-
【FE】 Finish register and login & CRUD for profile
> the process is using
useQuery
anduseMutation
from@urql/next
-
【BE】 Upload image to S3 and save to database > the process is using
aws-sdk
to upload image to S3 > Since form-data is restricted by GraphQL, create API route by nextjs instead.
- Setup User in S3, reference: https://conermurphy.com/blog/presigned-urls-nextjs-s3-upload
Useful resources
- 【Youtube】Storing Images in S3 from Node Server
- 【Frontend Master】Server-Side GraphQL in Next.js
- 【DOC】drizzle-orm
- 【DOC】dnd-kit
- 【DOC】@urql/next
- GraphQL 's data is restricted in NextJS, some unexpected error comes up in server or CRUD => read doc more frequently, e.g. :
- First time to try up DB by myself!
- Wondering how to deal with form more efficiency in React.
- Any Feedback is welcome :D
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord