Tech Stack
This project uses React and Vite in Javascript. UI Components are from @shadcn/ui with TailwindCSS.
In this project, bun is used as our JS Runtime & development toolkit. To get started, install bun:
# Linux & Mac:
curl -fsSL https://bun.sh/install | bash
# Windows:
powershell -c "irm bun.sh/install.ps1 | iex"
Make sure to have nodejs and other necessary dependencies ready.
After successfully installing bun, run:
bun install
This should install the necessary npm packages for the project.
To run the development server, run:
bun run dev
You will be greeted with Vite's dev CLI toolkit. Use the following shortcuts to navigate within the CLI:
Shortcuts
- press r + enter to restart the server
- press u + enter to show server url
- press o + enter to open in browser
- press c + enter to clear console
- press q + enter to quit
To build the production-ready website, run:
bun run build
After building, check for any issues by previewing the built bundle buy running:
bun run preview
Important
Add visualizer()
to plugins for chunking visualization. Smaller chunks >>> Bigger chunks!
Output: stats.html
. Open this via browser or any HTML viewer.
For more options, see the Vite guide.
You'll be requiring two environmaent variables:
VITE_GITHUB_TOKEN='your_github_token'
VITE_MODE=dev
- Your Github Personal Access Token is required for fetching from Github's API with lower rate limits.
- The mode needs to be set in order for the proxies in
vite.config.js
to function properly.
Note
These environment variables aren't needed in the production build as a separate file! Use Github Action's environmental secrets to add your variables.