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

Поделиться
HTML-код
  • Опубликовано: 14 июн 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
  • НаукаНаука

Комментарии • 113

  • @gionatha
    @gionatha  4 месяца назад +17

    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 4 месяца назад

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

    • @vmaspadlegion8215
      @vmaspadlegion8215 4 месяца назад +5

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

    • @gionatha
      @gionatha  4 месяца назад +1

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

    • @vmaspadlegion8215
      @vmaspadlegion8215 4 месяца назад +4

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

    • @user-tn8ec6yl4b
      @user-tn8ec6yl4b 2 месяца назад +7

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

  • @codewithantonio
    @codewithantonio 5 месяцев назад +85

    Really cool and original project!

    • @gionatha
      @gionatha  5 месяцев назад +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 4 месяца назад

      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 4 месяца назад +9

      @@OmniOmnium no one asked

    • @starX7995
      @starX7995 4 месяца назад

      @@OmniOmnium did u do also ?

    • @ElevateLife896
      @ElevateLife896 14 дней назад

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

  • @moose43h
    @moose43h 3 месяца назад +8

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

  • @thedevnoteyt
    @thedevnoteyt 5 месяцев назад +21

    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  5 месяцев назад +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.

  • @haiffy
    @haiffy 5 месяцев назад +5

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

  • @languageswithenoch4417
    @languageswithenoch4417 4 месяца назад +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 4 месяца назад +2

      I was thinking the exact same thing.

  • @SubzeroGamers100
    @SubzeroGamers100 2 месяца назад +1

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

  • @avocadoamongos
    @avocadoamongos 16 дней назад +1

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

  • @NIXO3D
    @NIXO3D 4 месяца назад +1

    This tutorial is gold 🔥 Thank you for sharing

  • @superuser8636
    @superuser8636 5 месяцев назад +1

    Great video. Original and useful content. Well done 🎉

  • @afkanozdemir8930
    @afkanozdemir8930 5 месяцев назад +1

    This is really cool and unique project !

  • @joaonascimento3574
    @joaonascimento3574 2 месяца назад

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

  • @kirubakaran8478
    @kirubakaran8478 День назад

    Thank you so much, Extremely useful video

  • @anshulsoni653
    @anshulsoni653 4 месяца назад +1

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

  • @dharsanr6504
    @dharsanr6504 5 месяцев назад +1

    You are just awesome man : ) keep going 👍👍

  • @andrhamm
    @andrhamm Месяц назад

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

  • @user-us6ie4ty6n
    @user-us6ie4ty6n 3 месяца назад

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

  • @azzeddinesaidi6637
    @azzeddinesaidi6637 5 месяцев назад +1

    This is amazing, thanks for your sharing!

  • @tupuedesnelson
    @tupuedesnelson Месяц назад +1

    This video is pure Gold!!!!!!

  • @jarostaz
    @jarostaz 2 месяца назад +2

    Useful stuff! Thanks :)

  • @lustrous8916
    @lustrous8916 3 месяца назад +1

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

  • @vladmehedintu5912
    @vladmehedintu5912 28 дней назад +1

    Great video! GJ!🤓

    • @gionatha
      @gionatha  28 дней назад

      Thanks so much 🙏🏻

  • @thorn8395
    @thorn8395 4 месяца назад

    amazing tutorial! just finished it

  • @HarshYadav-yi7tv
    @HarshYadav-yi7tv 29 дней назад +1

    You are a life saver ;)

  • @maurolimaok
    @maurolimaok Месяц назад

    Nice channel.
    Thanks for the inspiration

  • @techh4ck936
    @techh4ck936 5 месяцев назад +1

    thanks for share this video, i love it💖

  • @rkcoder
    @rkcoder 2 месяца назад

    Awesome video!

  • @hassaantahir3861
    @hassaantahir3861 5 месяцев назад

    Awesome bro.. unique content

  • @highvolt1727
    @highvolt1727 4 месяца назад

    It was good, thank you for video!

  • @gabriellicar
    @gabriellicar 2 месяца назад

    Oh my... Awesome project

  • @raymondmichael4987
    @raymondmichael4987 5 месяцев назад

    Great buddy; this is good

  • @markpieterse2974
    @markpieterse2974 5 месяцев назад

    Unique and useful 👍👍👍

  • @okiroroobrutheanagho8779
    @okiroroobrutheanagho8779 4 месяца назад +1

    This is great

  • @14nathan7
    @14nathan7 4 месяца назад +2

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

  • @vinayakhegde4216
    @vinayakhegde4216 5 месяцев назад +2

    This is amazing bro would try this with tauri :D

    • @gionatha
      @gionatha  5 месяцев назад +1

      Awesome, Tauri is a great alternative to Electron :)

    • @ulrich-tonmoy
      @ulrich-tonmoy 5 месяцев назад +2

      Im following this and trying to use Tauri instead of Electron

  • @awakenwithoutcoffee
    @awakenwithoutcoffee 3 месяца назад

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

  • @darshanheble1844
    @darshanheble1844 13 дней назад

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

  • @Coding-Yogi
    @Coding-Yogi 3 месяца назад

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

  • @mysticftn
    @mysticftn 4 месяца назад +1

    Hi, what is your theme ?

  • @marinbb6946
    @marinbb6946 3 месяца назад

    What mouse and keyboard are u using for coding?

  • @user-oh2mo1jb6x
    @user-oh2mo1jb6x 3 месяца назад

    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 29 дней назад

    How would this be possible with Nuxt instead of React?

  • @xsamuelx3603
    @xsamuelx3603 5 месяцев назад +2

    Looks like dev as life :)

    • @gionatha
      @gionatha  5 месяцев назад +1

      Yes 😀 I took so much inspiration from @devaslife video

  • @ShahriarCode
    @ShahriarCode 4 месяца назад

    How do u get so smooth cursor movement bro?

  • @anujpatil1050
    @anujpatil1050 4 месяца назад

    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  4 месяца назад +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

  • @DoubleDotStudio
    @DoubleDotStudio 2 месяца назад +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  2 месяца назад

      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 2 месяца назад

      @@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.

  • @syxshooters3121
    @syxshooters3121 4 месяца назад +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

    • @gionatha
      @gionatha  4 месяца назад +1

      Sure, no problem 😄

    • @syxshooters3121
      @syxshooters3121 4 месяца назад

      @@gionathaThanks 😊😊

  • @visamalog
    @visamalog 4 месяца назад

    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 4 месяца назад +2

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

  • @ILevizzz
    @ILevizzz 4 месяца назад

    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  4 месяца назад

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

  • @MariaFernanda-zx2lq
    @MariaFernanda-zx2lq 3 месяца назад

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

    • @gionatha
      @gionatha  3 месяца назад

      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

  • @NamalJayathunga
    @NamalJayathunga 5 месяцев назад +1

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

    • @gionatha
      @gionatha  5 месяцев назад

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

    • @NamalJayathunga
      @NamalJayathunga 5 месяцев назад

      @@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  5 месяцев назад +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

  • @DanielA-ff2gf
    @DanielA-ff2gf 2 месяца назад

    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

  • @rusisolanki121210
    @rusisolanki121210 4 месяца назад +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  4 месяца назад

      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 4 месяца назад

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

  • @MRNandemoari
    @MRNandemoari 4 месяца назад

    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  4 месяца назад

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

  • @sonerrsonmez
    @sonerrsonmez 5 месяцев назад +3

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

    • @gionatha
      @gionatha  5 месяцев назад +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 4 месяца назад +1

      @@gionatha it doesn't work on windows neither

    • @gionatha
      @gionatha  4 месяца назад

      ​@@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 4 месяца назад +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

  • @hifichannel3510
    @hifichannel3510 4 месяца назад +1

    Could you please share your vscode configs setup

    • @kaiparado
      @kaiparado Месяц назад

      Should be good to follow the code now the theme

  • @techh4ck936
    @techh4ck936 5 месяцев назад +1

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

    • @MRNandemoari
      @MRNandemoari 5 месяцев назад +3

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

    • @techh4ck936
      @techh4ck936 5 месяцев назад

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

    • @MRNandemoari
      @MRNandemoari 5 месяцев назад

      @@techh4ck936 No problem.

    • @giamynguyen1934
      @giamynguyen1934 4 месяца назад +2

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

  • @atmanirbharofficialindiaon2789
    @atmanirbharofficialindiaon2789 5 месяцев назад +1

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

  • @frenchmike
    @frenchmike 5 месяцев назад +1

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

  • @developersworld4413
    @developersworld4413 26 дней назад

    40:40

  • @developerGorilla
    @developerGorilla 3 месяца назад

    Are you inkdrop user?

    • @gionatha
      @gionatha  3 месяца назад +1

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

  • @control7004
    @control7004 26 дней назад

    volume is just too low,

  • @sajeersayed2008
    @sajeersayed2008 2 месяца назад

    Bloody complicated