a project by Norb
A tranquil place where you can read and wonder.
Norb's Nook 📖 is part of a school project about building a Bookstore system using c++.
To install the system on your local pc, it is recommended that you clone it using git.
git clone https://github.com/RayZh-hs/Norbs-Nook.git
cd Norbs-Nook
There are two entry points for the software: CUI (for the OJ) and GUI.
To run the GUI, first build the GUI runtime:
cmake -B build
cmake --build build --target gui_runtime
In one terminal, navigate to the api folder and create a virtual environment and install Flask (the command below is for Linux/macOS, similarly call the .bat source if you are on Windows):
cd src/api
python -m venv venv
source ./venv/bin/activate
pip install flask
After this, you may start the API server:
python server.py
In another terminal, please go to the root project folder, then navigate to the frontend folder and install all dependencies:
cd src/frontend/norbs-nook-frontend
npm install
Run the server as follows:
npm run dev
You shall be able to see and use the GUI afterward.
(Optional) In order to use the mobile payment page, you need to set up a public url. You may use any frp service to map localhost:5173 to a public port, and insert the public port in src/frontend/norbs-nook-frontend/private/private.ts
:
export default {
"bind-address": "your-port-here",
}
Then you may use your phone to redirect to the payment webpage.
To run the CUI:
cmake -B build
cmake --build build --target code
./code
This will run the generated code
executable. Note that for OJ-testing purposes all the data files will be created directly in the root folder of the project. You can clear them using:
./run -c
This software acknowledges use of the following open-source projects, and is built upon such. I genuinely thank the authors for making these amazing projects available for use!
- C++ related
- nlohmann / json: JSON for Modern C++. See src/backend/lib/json.hpp.
- Python related
- Flask: The Python micro framework for building web applications. See src/api/
- Web related
- Vue: A progressive, incrementally-adoptable JavaScript framework for building UI on the web.
- Naive UI: A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
- Vite: Next generation frontend tooling. It's fast!
- Router: The official router for Vue.js
- Chart.js: Simple yet flexible JavaScript charting library for the modern web.
- vue-chartjs: ⚡ Easy and beautiful charts with Chart.js and Vue.js.
Made with 💖 by Norb.