A Simple GoFr Mini Project built by a Go Getter (Stocks Management API) !!
Build a simple HTTP (REST) API using GoFr-- (Stocks API)
-
Create ✅
-
Read ✅
-
Update/Delete ✅
2. DB Integration: The API should have integration with database for persistence of data. Any SQL or NoSQL DB, which has a freely available docker image, may be used
-
Database Creation ✅
-
Integration using Gofr ✅
-
All CRUD op represent approximate unit test coverage ✅
-
Try to incorporate a real-world scenario while implementing the project. ✅
- The real world scenario involves Stock Management API where user can retrieve details in relation with STOCKS. ✅
-
Unit Test Coverage > 90%
-
Postman collection for trying out the APIs(partially done) ❗✔️
-
Sequence diagrams, UML diagrams ✅
-
Subtle Front-End components provided for easy understanding ✅
[[ The following sequence diagram represents the outline of the API as complexity of the entire application and the interactions with the gofr package and the database is not possible here. ]]
![SEQ diag](https://github.com/galvinguy2002/Zopsmart-GoFr-Project/blob/main/img/seq.png)
--> Additional UML Diagram for visual understanding :
![UML diag](https://github.com/galvinguy2002/Zopsmart-GoFr-Project/blob/main/img/UML.png)
Prerequisites:
- Ensure you have Go installed on your system. If not, you can download and install it. FOLLOW IN ORDER
-
Clone the Repo
- Clone the repository containing the Go code for the Movie Management API.
-
Install Dependencies:
- If your project has any external dependencies, use the following command to install them.
go get ./... -->gofr -->npm packages (if req) -->go mod tidy/go mod init for tracking
-
Build and Run:
- Build and run the
main.go
file. go run main.go
This will start the API server, and it will be accessible at `http://localhost:8000`.
- Build and run the
-
Testing with Postman:
- Install Postman to test the API endpoints.
- Use Postman to send HTTP requests to the API at
http://localhost:8000/stock
for testing CRUD operations.
Make sure you have the following installed on your machine:
- Node.js & npm - Download & Install Node.js
- Git - Download & Install Git
-
Clone the repository:
git clone https://github.com/galvinguy2002/Zopsmart-GoFr-Project
-
Navigate to the project directory:
cd stocks-management-app
-
Install dependencies:
npm install
To stat the React development server, use the following command:
npm start
Built with :
Golang & GoFr
HAPPY CODING :)
WITH REGARDS TO THE ZOPSMART TEAM
Harshvardhan Saxena
20104064
harshsaxena5434@gmail.com
Jaypee Institute of Information Technology(JIIT), Noida