You are browsing as a guest. Sign up (or log in) to start making projects!

Tungsten

  • 2 Devlogs
  • 6 Total hours

A very simple self-hosted web app that serves as an obsidian alternative, but simpler. Very opinionated but simple and quick. Built with Next.JS!

Open comments for this post

2h 48m 13s logged

Made the sidebar, tabs, and creating files work! You can open tabs for each file you’re working on and see the content of them in the editor.

I actually went to the react documentation to learn some best practices… as I wanted to avoid passing a million props down through the component tree and passing a bunch of callbacks back up. This is called “prop drilling” and it’s the worst thing ever. I learned how to use React’s context system to “teleport” the props I need to the part of the tree that needs them. As you can see, it works flawlessly! Most of the components you see don’t even have props, which makes it so much easier to work with.

Made the sidebar, tabs, and creating files work! You can open tabs for each file you’re working on and see the content of them in the editor.

I actually went to the react documentation to learn some best practices… as I wanted to avoid passing a million props down through the component tree and passing a bunch of callbacks back up. This is called “prop drilling” and it’s the worst thing ever. I learned how to use React’s context system to “teleport” the props I need to the part of the tree that needs them. As you can see, it works flawlessly! Most of the components you see don’t even have props, which makes it so much easier to work with.

Replying to @DrewRat

0
4
Open comments for this post

2h 49m 39s logged

Log in page and basic editor UI!

I used Auth.JS for the credentials login. I actually hate that framework and could do it myself but I’m lazy. It probably took longer to set it up than to figure out how JWTs work.

The editor is a WYSIWYG markdown editor called MDXEditor. It’s a struggle to work with cause they use their own stupid styling with no real way to style it other than overriding CSS that I can tell.

Next up is getting pages working in the database!

Log in page and basic editor UI!

I used Auth.JS for the credentials login. I actually hate that framework and could do it myself but I’m lazy. It probably took longer to set it up than to figure out how JWTs work.

The editor is a WYSIWYG markdown editor called MDXEditor. It’s a struggle to work with cause they use their own stupid styling with no real way to style it other than overriding CSS that I can tell.

Next up is getting pages working in the database!

Replying to @DrewRat

0
2

Followers

Loading…