Welcome! This guide will help you get up and running with your new project.
Since you're on NixOS, all the tools you need are already configured in the flake.nix file.
cd /home/fredrik/bethebot/pathofuseful
nix developThis will download and set up Node.js, npm, TypeScript, and everything else you need WITHOUT installing them globally on your system.
Once you're in the Nix shell, run:
npm installThis downloads all the React, Vite, TailwindCSS, and other libraries needed for the project.
npm run devYou should see something like:
VITE v6.0.11 ready in 500 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
Open http://localhost:5173/ in your browser!
- Open
src/App.tsxin your favorite text editor - Change the text "Welcome!" to something else
- Save the file
- Watch your browser automatically update! (This is called "hot reload")
poe-leveling-craft/
├── flake.nix # Nix development environment config
├── package.json # Project dependencies and scripts
├── vite.config.ts # Vite build tool configuration
├── tsconfig.json # TypeScript compiler settings
├── tailwind.config.js # TailwindCSS styling config
├── index.html # Main HTML file
└── src/
├── main.tsx # App entry point
├── App.tsx # Main app component (start here!)
└── index.css # Global styles (TailwindCSS imports)
This is where you'll spend most of your time. It's written in TSX (TypeScript + JSX), which looks like HTML inside JavaScript:
<div className="min-h-screen bg-gray-900 text-white">
<h1>Hello World</h1>
</div>classNameis how you add CSS classes (uses TailwindCSS utilities)- Everything inside
return ()is what gets displayed {count}is how you insert JavaScript variables into your HTML
Instead of writing CSS files, you use utility classes:
bg-gray-900= dark gray backgroundtext-white= white textp-4= padding of 1remrounded-lg= large rounded cornershover:bg-blue-700= darker blue on hover
const [count, setCount] = useState(0)countis the current value (starts at 0)setCountis the function to update it- When you click the button, it calls
setCount(count + 1) - React automatically re-renders with the new value
Now that you have a working environment, here's what we should do:
- Copy game data from the original project (gems, areas, quests)
- Create basic components (RouteDisplay, CraftingPanel, GearRecommendations)
- Add state management with Zustand (track progress, store build data)
- Build the route parser (understand the DSL from the original project)
- Add Path of Building import (so users can paste their build codes)
Ctrl+Cin the terminal - Stop the dev servernpm run build- Create a production build (in thedist/folder)npm run preview- Test the production build locally
If you get errors:
- Read the error message carefully (they're usually helpful!)
- Check the browser console (F12 → Console tab)
- Make sure you're in the Nix shell (
nix develop) - Try deleting
node_modulesand runningnpm installagain
- React Tutorial - Official React docs (very beginner-friendly)
- TypeScript Handbook
- TailwindCSS Docs
- Zustand Guide
Ready to build something cool! 🚀