Build a Markdown Notes app with Electron, React, Typescript, Tailwind and Jotai

Sdílet
Vložit
  • čas přidán 11. 07. 2024
  • 🌱 Source Code: www.codewithgionatha.com/repo...
    💬 Discord: / discord
    📚 Resources
    electron-vite: electron-vite.org/
    In this video, we are going to build a Markdown Notes desktop application using Electron, React, Typescript, Tailwind, and Jotai.
    Timestamps
    00:00:00 Intro
    00:02:16 Creating an Electron Project
    00:09:38 Codebase configuration (Prettier, eslint, tsconfig)
    00:19:08 Project structure
    00:26:48 Styling setup
    00:33:08 Creating the UI
    01:11:22 Adding the Editor
    01:23:30 Adding Jotai
    01:49:45 File system integration
    01:55:44 Reading the notes from fs
    02:14:50 Reading the content of the note
    02:25:00 Saving the note content
    02:32:45 Implementing auto saving
    02:42:19 Creating new notes
    02:55:00 Deleting the notes
    03:09:09 App bundling
    03:13:42 Outro
  • Věda a technologie

Komentáře • 123

  • @gionatha
    @gionatha  Před 5 měsíci +18

    Unfortunately, I discovered later that Windows has some compatibility problems. Specifically, the background blur effect seems to be supported only on MacOS.
    Also path separators are different: on Windows you should use `\` instead of `/`.

    • @vmaspadlegion8215
      @vmaspadlegion8215 Před 5 měsíci

      this solution is:
      export const getRootDir = () =>{
      return `${homedir()\\${appDirectoryName}}`
      }

    • @vmaspadlegion8215
      @vmaspadlegion8215 Před 5 měsíci +6

      And styles:
      body {
      @apply h-full;
      @apply select-none;
      @apply bg-slate-900;
      @apply font-mono antialiased text-white;
      @apply overflow-hidden;
      }

    • @gionatha
      @gionatha  Před 5 měsíci +1

      @@vmaspadlegion8215 I added it at 00:28:38

    • @vmaspadlegion8215
      @vmaspadlegion8215 Před 5 měsíci +4

      @@gionatha Oh yes I saw it, I just added the version for those who are windows users.

    • @user-tn8ec6yl4b
      @user-tn8ec6yl4b Před 3 měsíci +10

      set backgroundMaterial to 'acrylic' will make the background blur take effect on windows11
      const window = new BrowserWindow({
      backgroundMaterial: 'acrylic' // on Windows 11
      })

  • @codewithantonio
    @codewithantonio Před 6 měsíci +90

    Really cool and original project!

    • @gionatha
      @gionatha  Před 6 měsíci +18

      Hey Antonio 👋
      So awesome to hear from you! Your channel was super inspiring, and it really got me pumped up to try doing the same thing.
      Thanks a bunch for being such a positive influence! 🌟

    • @OmniOmnium
      @OmniOmnium Před 5 měsíci

      I wouldn't really call it original when devaslife already made it 2 years ago. Not the mention the vibrancy design is quite similar.

    • @ILevizzz
      @ILevizzz Před 5 měsíci +10

      @@OmniOmnium no one asked

    • @starX7995
      @starX7995 Před 5 měsíci

      @@OmniOmnium did u do also ?

    • @hadi_2122
      @hadi_2122 Před měsícem

      Hey Antonio, Don't you have any plans for creating an electron project tutorial?

  • @moose43h
    @moose43h Před 4 měsíci +11

    Thank god dude. There are almost no react electron projects on CZcams. Thank you

  • @haiffy
    @haiffy Před 6 měsíci +5

    This video pops up in my recommendation, exactly when I needed this, thanks

  • @superuser8636
    @superuser8636 Před 6 měsíci +1

    Great video. Original and useful content. Well done 🎉

  • @anshulsoni653
    @anshulsoni653 Před 5 měsíci +1

    really liked it, gonna make this in couple of days
    thanks man

  • @NIXO3D
    @NIXO3D Před 5 měsíci +1

    This tutorial is gold 🔥 Thank you for sharing

  • @avocadoamongos
    @avocadoamongos Před měsícem +1

    Very interesting project, just what I was looking for thanks!

  • @afkanozdemir8930
    @afkanozdemir8930 Před 6 měsíci +1

    This is really cool and unique project !

  • @SubzeroGamers100
    @SubzeroGamers100 Před 3 měsíci +1

    Thanks gionatha you helped me alot, I wish you good luck for your channel!

  • @andrhamm
    @andrhamm Před měsícem

    Great great job!! Thanks for sharing, this was super helpful!

  • @azzeddinesaidi6637
    @azzeddinesaidi6637 Před 6 měsíci +1

    This is amazing, thanks for your sharing!

  • @dharsanr6504
    @dharsanr6504 Před 6 měsíci +1

    You are just awesome man : ) keep going 👍👍

  • @languageswithenoch4417
    @languageswithenoch4417 Před 5 měsíci +6

    This is amazing, youtube instructors hardly make full projects with electron js, Thank you so much. I am definitely working on this and adding it to my portfolio🙏🏽🙏🏽🙏🏽

    • @2ru2pacFan
      @2ru2pacFan Před 5 měsíci +2

      I was thinking the exact same thing.

  • @thedevnoteyt
    @thedevnoteyt Před 6 měsíci +22

    Finally someone with something new & unique. Please bring more Electron content if possible.
    Btw have you ever tried Tauri with Solid or React ?

    • @gionatha
      @gionatha  Před 6 měsíci +6

      Hey, thanks so much!
      Yes, I heard that Tauri is the next big thing after Electron for his performances. Never had the chance to test it with React or Solid.

  • @SoapCS2
    @SoapCS2 Před 4 dny

    Great Video!

  • @joaonascimento3574
    @joaonascimento3574 Před 3 měsíci

    Already subscribed to your channel! I noticed you make a effort to offer content based on the best technologies nowadays!

  • @user-us6ie4ty6n
    @user-us6ie4ty6n Před 3 měsíci

    Thank you very much for your tutorial. You have opened my door to a new world.

  • @kirubakaran8478
    @kirubakaran8478 Před 28 dny

    Thank you so much, Extremely useful video

  • @user-yn9yr8hq8v
    @user-yn9yr8hq8v Před 5 dny

    Thank for this video 🙏🙏

  • @jarostaz
    @jarostaz Před 3 měsíci +2

    Useful stuff! Thanks :)

  • @lustrous8916
    @lustrous8916 Před 4 měsíci +1

    thanks for the tutorial, it is very detailed and helpful.👍

  • @tupuedesnelson
    @tupuedesnelson Před 2 měsíci +1

    This video is pure Gold!!!!!!

  • @maurolimaok
    @maurolimaok Před měsícem

    Nice channel.
    Thanks for the inspiration

  • @thorn8395
    @thorn8395 Před 5 měsíci

    amazing tutorial! just finished it

  • @HarshYadav-yi7tv
    @HarshYadav-yi7tv Před měsícem +1

    You are a life saver ;)

  • @rkcoder
    @rkcoder Před 3 měsíci

    Awesome video!

  • @techh4ck936
    @techh4ck936 Před 6 měsíci +1

    thanks for share this video, i love it💖

  • @highvolt1727
    @highvolt1727 Před 5 měsíci

    It was good, thank you for video!

  • @hassaantahir3861
    @hassaantahir3861 Před 6 měsíci

    Awesome bro.. unique content

  • @gabriellicar
    @gabriellicar Před 3 měsíci

    Oh my... Awesome project

  • @markpieterse2974
    @markpieterse2974 Před 6 měsíci

    Unique and useful 👍👍👍

  • @raymondmichael4987
    @raymondmichael4987 Před 6 měsíci

    Great buddy; this is good

  • @vladmehedintu5912
    @vladmehedintu5912 Před měsícem +1

    Great video! GJ!🤓

    • @gionatha
      @gionatha  Před měsícem

      Thanks so much 🙏🏻

  • @okiroroobrutheanagho8779
    @okiroroobrutheanagho8779 Před 5 měsíci +1

    This is great

  • @awakenwithoutcoffee
    @awakenwithoutcoffee Před 4 měsíci

    appreciated I am looking to learn how to make my own software.

  • @vinayakhegde4216
    @vinayakhegde4216 Před 6 měsíci +2

    This is amazing bro would try this with tauri :D

    • @gionatha
      @gionatha  Před 6 měsíci +1

      Awesome, Tauri is a great alternative to Electron :)

    • @ulrich-tonmoy
      @ulrich-tonmoy Před 6 měsíci +2

      Im following this and trying to use Tauri instead of Electron

  • @user-ew1dl4dh3e
    @user-ew1dl4dh3e Před 20 dny +1

    dude can we get some more electronjs projects?

  • @14nathan7
    @14nathan7 Před 5 měsíci +2

    Please extend this video 👍
    But, anyway, is this app supported by windows?

  • @darshanheble1844
    @darshanheble1844 Před měsícem

    In electron vite using react, how do I pass data from main to renderer?

  • @Coding-Yogi
    @Coding-Yogi Před 4 měsíci

    Hey, if we are using something like firebase (in my case appwrite) how to configure it ?

  • @user-bu2tr9bn9t
    @user-bu2tr9bn9t Před 23 dny

    I have created a child window above the parent window.
    how can i display componet on it

  • @mysticftn
    @mysticftn Před 5 měsíci +1

    Hi, what is your theme ?

  • @ShahriarCode
    @ShahriarCode Před 5 měsíci

    How do u get so smooth cursor movement bro?

  • @user-oh2mo1jb6x
    @user-oh2mo1jb6x Před 4 měsíci

    Hello. I use your github code and use the `@shared/types` alias in `main.ts` in the project to import the types in the shared folder. When webstorm moves the mouse over the imported type, the type is not recognized and vscode is normal. Thank you

  • @seandegee
    @seandegee Před měsícem

    How would this be possible with Nuxt instead of React?

  • @marinbb6946
    @marinbb6946 Před 4 měsíci

    What mouse and keyboard are u using for coding?

  • @xsamuelx3603
    @xsamuelx3603 Před 6 měsíci +2

    Looks like dev as life :)

    • @gionatha
      @gionatha  Před 6 měsíci +1

      Yes 😀 I took so much inspiration from @devaslife video

  • @liam.wahlberg
    @liam.wahlberg Před 18 dny

    what extension are you using to sort the import modules order

    • @gionatha
      @gionatha  Před 17 dny

      It's a VScode setting feature (settings.json file)
      "editor.codeActionsOnSave": {
      "source.organizeImports": "always",
      },

  • @anujpatil1050
    @anujpatil1050 Před 5 měsíci

    How will the folder structure change if we have more windows in the application ? As there is preload and renderer for every window right?

    • @gionatha
      @gionatha  Před 5 měsíci +1

      Hey, I found some info regarding having multiple windows, in the official electron-vite doc, here you go: electron-vite.org/guide/dev#multiple-windows-app

  • @sonerrsonmez
    @sonerrsonmez Před 6 měsíci +3

    Transparency doesn't work in linux, but it doesn't affect the quality of the video thanks for the content.

    • @gionatha
      @gionatha  Před 6 měsíci +1

      Hey soner, thanks for letting me know 🙏
      I actually didn't try it on Linux environment and unfortunately, the tutorial is heavily based on a MacOS

    • @ILevizzz
      @ILevizzz Před 5 měsíci +1

      @@gionatha it doesn't work on windows neither

    • @gionatha
      @gionatha  Před 5 měsíci

      ​@@ILevizzzUnfortunately I think that the properties to make the window blurred work only on MacOS.
      I'll see if there is a way to make it work cross-platform.

    • @ILevizzz
      @ILevizzz Před 5 měsíci +1

      @@gionatha dont worry! I found a solution in the docs, its not the same as the video, but it works for me, thanks for the response

    • @andersongomezgarcia1933
      @andersongomezgarcia1933 Před 13 dny

      @@ILevizzz Puedes mostrar la alternativa para windows?

  • @ILevizzz
    @ILevizzz Před 5 měsíci

    Im having problems with the imports on the index file in the lib folder, it doesn't let me import NoteInfo or variables for constants, if you can help me i really appreciates it

    • @gionatha
      @gionatha  Před 5 měsíci

      Hey, maybe we can discuss this on the Discord server. Find the link in the desc. 👍

  • @DanielA-ff2gf
    @DanielA-ff2gf Před 3 měsíci

    Hey I'm stuck on installing the tailwind for this project. I've rewatched "styling setup" 3 times now and I'm not going anywhere. Any fix? I'm on windows. Please and thanks

  • @syxshooters3121
    @syxshooters3121 Před 5 měsíci +2

    A great Project To Have in the resume. Can I use this project and add some modification with some extra features and publish it as a open source project. If you have permission

  • @MariaFernanda-zx2lq
    @MariaFernanda-zx2lq Před 4 měsíci

    I always get window equal to undefined, did you do anything to avoid this error?

    • @gionatha
      @gionatha  Před 4 měsíci

      Did you define this file 👇 github.com/gionathas/NoteMark/blob/a679397cc887db257487e1ea22ff98a585f80443/src/preload/index.d.ts
      Also you get window = undefined at static time (ts complaining) or at runtime?
      Btw we can discuss further on discord: discord.com/invite/mN8WD6M4dR

  • @rusisolanki121210
    @rusisolanki121210 Před 5 měsíci +1

    I am trying to use MDXEditor in a different project but the markdown is not working even after importing the plugins. Any solutions?

    • @gionatha
      @gionatha  Před 5 měsíci

      I think you are missing the prosing styling. What MDX does is injecting the corresponding markdown as html into your document, and that html needs to be styled properly to look nice.
      For example if you insert an heading1, your html will then contain a corresponding h1 element (but unstyled)
      I resolved that problem by using tailwind-typography on the root of my markdown editor.

    • @rusisolanki121210
      @rusisolanki121210 Před 5 měsíci

      @@gionatha I configured tailwind typography as well but it still didn’t work

  • @DoubleDotStudio
    @DoubleDotStudio Před 3 měsíci +1

    Is it possible to use a .rtf instead of a .txt?
    Also is it possible to have formatting stack? e.g bold and italic
    Great video!

    • @gionatha
      @gionatha  Před 3 měsíci

      Thanks! I think it should be possible but you would need to update the file extension to look for .rtf instead of .txt. Also the enconding of those file should be kept to utf-8.
      As for the formatting abilities take a look at the library plugins: mdxeditor.dev/editor/docs/getting-started

    • @DoubleDotStudio
      @DoubleDotStudio Před 3 měsíci

      @@gionatha Thank you.
      What would the name be changed to in the file filter. Is it 'RTF.'? And would this allow underline since currently with markdown there is no underlining but it says it's possible in the MDXEditor docs.

  • @MRNandemoari
    @MRNandemoari Před 5 měsíci

    1:55:00 I think I have follow all of the steps, but idk why I can't import the constant from the shared folder to the main/lib folder. The shared alias working fine on renderer though. Does anybody have a clue on how to fix this? This is actually the first time I'm trying react.js so yeah.

    • @gionatha
      @gionatha  Před 5 měsíci

      Hey if you have more info we can discuss it on Discord. Link in the description.

  • @NamalJayathunga
    @NamalJayathunga Před 6 měsíci +1

    Thank you. Could you implement a simple plugin system into this electron project and make a video.

    • @gionatha
      @gionatha  Před 6 měsíci

      Hey @Namal, what do you mean by plugin system?

    • @NamalJayathunga
      @NamalJayathunga Před 6 měsíci

      @@gionatha install third party extension. Then other devs can write own logics into this electron app. Ex: vscode's todo, bookmark, prettier extension.

    • @gionatha
      @gionatha  Před 6 měsíci +1

      @@NamalJayathunga Still I don't get it, maybe we can discuss it later on Discord, you can find me here: discord.com/invite/mN8WD6M4dR

  • @visamalog
    @visamalog Před 5 měsíci

    it looks really cool but unluckily there are some fancy options I can't use in Windows. For example the background can't be transparent, so there are some CSS I have to change.

    • @faizanmehmood95
      @faizanmehmood95 Před 4 měsíci +2

      add the following line in the browesr window instance backgroundMaterial: "acrylic",

  • @zrxmax_
    @zrxmax_ Před 21 dnem

    I think it's better to create css class draggable, instead of apply it to header
    .draggable {
    -webkit-app-region: drag;
    }
    also you can apply no-drag to all body to make sure no other element will be draggable. What do you think?

    • @gionatha
      @gionatha  Před 21 dnem

      If only the header is supposed to be draggable I don't really see the point of making the entire window draggable and then disabling it with no drag 🤔
      Anyway both ways are valid IMHO.

  • @hifichannel3510
    @hifichannel3510 Před 5 měsíci +1

    Could you please share your vscode configs setup

    • @kaiparado
      @kaiparado Před 2 měsíci

      Should be good to follow the code now the theme

  • @atmanirbharofficialindiaon2789
    @atmanirbharofficialindiaon2789 Před 6 měsíci +1

    subscribed please bring some compllex apps on electron too pls there's no one on yt who does that yet

  • @techh4ck936
    @techh4ck936 Před 5 měsíci +1

    Hello, dude. I attempted this project with my Windows 11, but the blur effect does not appear.

    • @MRNandemoari
      @MRNandemoari Před 5 měsíci +3

      Obviously, because the property trafficLightPosition, vibrancy, and visualEffectState only works on macOS. I suggest you to read the Electron.js documentation.

    • @techh4ck936
      @techh4ck936 Před 5 měsíci

      @@MRNandemoari ohh! okay! thanks for the info :)

    • @MRNandemoari
      @MRNandemoari Před 5 měsíci

      @@techh4ck936 No problem.

    • @giamynguyen1934
      @giamynguyen1934 Před 5 měsíci +2

      You should try this: in the src/main/index.ts, at line 17 (33:46), change 'vibrancy: 'under-window' to backgroundMaterial: 'acrylic'.

  • @frenchmike
    @frenchmike Před 6 měsíci +1

    20:04 -> i m just bookmarking n will rm my comment later.

  • @zrxmax_
    @zrxmax_ Před 21 dnem

    38:54 HOW?

  • @developerGorilla
    @developerGorilla Před 4 měsíci

    Are you inkdrop user?

    • @gionatha
      @gionatha  Před 4 měsíci +1

      I'm not, but I took inspiration from @devaslife's video 😃

  • @developersworld4413
    @developersworld4413 Před měsícem

    40:40

  • @control7004
    @control7004 Před měsícem

    volume is just too low,

  • @sajeersayed2008
    @sajeersayed2008 Před 3 měsíci

    Bloody complicated