The goal of this project was to learn about web development and how to build a complete full-stack application. I wanted to build a project with a dynamic UI frontend that displays project tasks which don't disappear when the user refreshes the page.
Demo
Golang Backend
- serves index.html in the p5-ui/ folder
- api at *domain*/api serves data in the form of a post (simply text and a number)
- api allows for POST, DELETE, and GET requests
- existing posts stored in Mongodb database
P5 Frontend (p5-ui/)
- With gui, interacts with the bacend in the following ways:
- POST request -> adds post
- DELETE request -> deletes post
- GET request -> gets posts
Session Management
- Keeps tracks of users exsisting posts with cookies for session management
- Cookies store userid which are associated with tasks in the MongoDB database
Note: Cookies are temporary and are just used for proof of concept. If I were to add to this project, I would create a more permenant login system to store user project data
Technologies
- Frontend -> p5.js is the main driver for the frontend, an open-source javascript library for interactive development
- Backend -> Go is the main driver for the backend
- Database -> MongoDB is the database of choice. It houses users and their associated tasks