A fast, full-stack notes app powered by a C backend, wrapped in FastAPI, with a clean vanilla HTML/CSS/JS frontend.
Originally started as a CLI project to learn C fundamentals — now evolved into a complete web app with a REST API and modern UI.
- Add, view, and delete notes
- Notes stored and managed by a custom C library (compiled to
.so) - FastAPI REST API wrapping the C core via
ctypes - Clean, responsive frontend UI
| Layer | Tech |
|---|---|
| Core | C (compiled to shared library) |
| Backend | Python, FastAPI, ctypes |
| Frontend | HTML, CSS, JavaScript |
memory-notes/
├── include/ # C header files
├── src/ # C source files
├── libnotes.so # Compiled C shared library
├── backend/
│ └── main.py # FastAPI app
├── frontend/
│ ├── index.html
│ ├── style.css
│ └── script.js
└── README.mdgcc -shared -fPIC -o libnotes.so src/*.c
(For Linux Users)cd backend
pip install fastapi uvicorn
uvicorn main:app --reloadThe API will be running at http://127.0.0.1:8000
cd frontend
python -m http.server 5500Open http://127.0.0.1:5500 in your browser.
| Method | Endpoint | Description |
|---|---|---|
| GET | /notes |
Get all notes |
| POST | /notes |
Add a new note |
| DELETE | /notes/{id} |
Delete a note by ID |
This project was built for learning:
- C fundamentals — structs, pointers, arrays, manual memory management
- Bridging C and Python with
ctypes - Building and consuming a REST API with FastAPI
- Frontend development with vanilla JS
This project is licensed under the MIT License.
