2023-02-04 12:51:14 +01:00
|
|
|
#+title: phundrak.com
|
|
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
#+html: <a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust-Backend-orange.svg?style=flat-square&logo=Rust&logoColor=white" /></a>
|
|
|
|
|
#+html: <a href="https://nuxt.com/"><img src="https://img.shields.io/badge/Frontend-Nuxt%204-00DC82?logo=Nuxt.js&logoColor=white&style=flat-square"/></a>
|
|
|
|
|
#+html: <a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3-42B883?logo=Vue.js&logoColor=white&style=flat-square"/></a>
|
|
|
|
|
#+html: <a href="https://phundrak.com"><img src="https://img.shields.io/badge/Website-phundrak.com-blue?style=flat-square&logo=buffer" /></a>
|
2023-03-22 11:46:09 +01:00
|
|
|
|
2023-02-04 12:51:14 +01:00
|
|
|
* Introduction
|
2023-05-14 17:18:00 +02:00
|
|
|
This is the repository for my website [[https://phundrak.com][phundrak.com]] which contains the
|
|
|
|
|
code available on the =main= branch. Code available on the =develop=
|
|
|
|
|
branch is available at [[https://beta.phundrak.com][beta.phundrak.com]].
|
2023-02-04 12:51:14 +01:00
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
* Architecture
|
|
|
|
|
The website follows a modern full-stack architecture:
|
|
|
|
|
|
|
|
|
|
- *Backend*: Rust using the [[https://github.com/poem-web/poem][Poem]] web framework (located in [[file:backend/][backend/]])
|
|
|
|
|
- *Frontend*: Nuxt 4 + Vue 3 + TypeScript (located in [[file:frontend/][frontend/]])
|
|
|
|
|
|
|
|
|
|
** Backend
|
|
|
|
|
The backend is written in Rust and provides a RESTful API using the
|
|
|
|
|
Poem framework with OpenAPI support.
|
|
|
|
|
|
|
|
|
|
*** Running the Backend
|
|
|
|
|
To run the backend in development mode:
|
|
|
|
|
#+begin_src shell
|
|
|
|
|
cd backend
|
|
|
|
|
cargo run
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
To run tests:
|
|
|
|
|
#+begin_src shell
|
|
|
|
|
cd backend
|
|
|
|
|
cargo test
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
For continuous testing and linting during development, use [[https://dystroy.org/bacon/][bacon]]:
|
2023-05-11 00:33:01 +02:00
|
|
|
#+begin_src shell
|
2025-11-04 09:17:18 +01:00
|
|
|
cd backend
|
|
|
|
|
bacon
|
2023-05-11 00:33:01 +02:00
|
|
|
#+end_src
|
|
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
*** Building the Backend
|
|
|
|
|
To build the backend for production:
|
|
|
|
|
#+begin_src shell
|
|
|
|
|
cd backend
|
|
|
|
|
cargo build --release
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
The compiled binary will be available at =backend/target/release/backend=.
|
|
|
|
|
|
|
|
|
|
** Frontend
|
|
|
|
|
The frontend is built with Nuxt 4, Vue 3, and TypeScript, providing a
|
|
|
|
|
modern single-page application experience.
|
|
|
|
|
|
|
|
|
|
*** Installing Dependencies
|
|
|
|
|
First, install the required dependencies using =pnpm=:
|
2023-02-04 12:51:14 +01:00
|
|
|
#+begin_src shell
|
2025-11-04 09:17:18 +01:00
|
|
|
cd frontend
|
|
|
|
|
pnpm install
|
2023-02-04 12:51:14 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
*** Running the Frontend
|
|
|
|
|
To run the frontend in development mode:
|
2023-02-04 12:51:14 +01:00
|
|
|
#+begin_src shell
|
2025-11-04 09:17:18 +01:00
|
|
|
cd frontend
|
|
|
|
|
pnpm dev
|
2023-02-04 12:51:14 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
*** Building the Frontend
|
|
|
|
|
To build the frontend for production:
|
2023-02-04 12:51:14 +01:00
|
|
|
#+begin_src shell
|
2025-11-04 09:17:18 +01:00
|
|
|
cd frontend
|
|
|
|
|
pnpm build
|
2023-02-04 12:51:14 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
2025-11-04 09:17:18 +01:00
|
|
|
The compiled version of the website can then be found in =frontend/.output=.
|