Skip to content

Latest commit

 

History

History
270 lines (174 loc) · 9.14 KB

Notes.mdx

File metadata and controls

270 lines (174 loc) · 9.14 KB

CanvasPro AI - Notes

Day 1

1. Introduction and Project Setup

2. Understanding the NextJS project structure

3. Fabric.js setup

4. Make responsive canvas using Resize Observer and add auto zoom

  • 🚨 TODO: Fix the canvas flickering issue on resizing

Day 2

5. Deploy to Vercel

6. Editor page layout setup

  • add components: Navbar, Sidebar, Toolbar, and Footer

7. Fix the canvas auto zoom issue

8. Improve Navbar component

9. Sidebar component

10. Select tool on navbar - selected state

Day 3

11. Editor Element Tool - Sidebar

12. Add Shapes to Canvas

13. Add support for Pentagon and Hexagon, ScrollBar support for ScrollArea

Day 4

14. Add support for fill color

  • 🚨 TODO: Fix the color picker related warnings in console

15. Fix active object fill color and manage color sidebar visibility

16. Add support for stroke color

17. Add stroke width tool

18. Add support for stroke options

19. Layering objects on canvas

20. Transparency for object

21. Text Sidebar - first draft

Day 5

22. Adjust font sizes for text buttons, toolbar tool visibility based on selected object

23. Font family

24. Font weight

25. Font style - normal, italic

26. Underline, linethough, uppercase

27. Text alignment - left, center, right, justify

28. Font Size

29. Delete object

30. Hono setup for building APIs

Day 6

31. Exploring Hono more in detail and building Photos support with react query, unsplash API

32. Use Bytescale to upload files for our project

33. Image Filter

34. AI based image generator

Day 7

35. Replicate AI based image background removal

36. Copy paste image from clipboard

37. Lock and Unlock feature for objects

38. Draw tool with brush color, brush weight

39. Canvas resize / custom size tool, canvas workspace background color

40. Zoom in, zoom out

41. Undo and Redo - Editor history

42. Shortcuts and hotkeys - Suggested by Shah Zaman

43. Export and Import

Day 8

44. Auth setup with Auth.js

45. Postgresql DB with neon connector and Drizzle Setup with Auth.js

46. Build Auth Pages UI and add Google OAuth

47. Credentials Auth with Auth.js

  • https://authjs.dev/getting-started/authentication/credentials

  • For google and github we have used db session strategy but for credentials we will use jwt strategy

  • db session strategy will create sessions with user id while jwt strategy sessions will not have an id. In order to add id follow this: https://authjs.dev/guides/extending-the-session

  • make sure to add password to the user schema so that it is saved in db.

  • npm run db:generate

  • npm run db:migrate

  • npm run db:studio

  • Note: Better to avoid credentials provider and stick to OAuth providers, magic link etc. And if that's the case, then we can use the db session strategy for all providers and get rid of jwt strategy

Day 9

48. Adding auth for hono API

49. Profile dropdown with Logout feature

50. Home Page

  • primary, secondary sidebars and main content area

51. Projects BE schema and API

Day 10

52. Fetch Project/design API

53. Save Project/design API

  • patch method

54. Recent Designs or Projects, Infinite Scroll with useInfiniteQuery, open in new tab, copy and delete design

55. Mark design as template, Create templates page

  • TODO: 🚨 Bug: Generate AI image and ai bg remover is not working

56. SAAS Implementation - UI with Zustand

  • Important: zustand is a client side state management library and if the component controlled by zustand are rendered on server side then it will cause some hydration issues. So make sure to use zustand only on client side. Also note that "use client" will not make sure that the component is not rendered on server side

57. SAAS Implementation - BE with Stripe