Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Latest commit

 

History

History
94 lines (49 loc) · 2.76 KB

README.md

File metadata and controls

94 lines (49 loc) · 2.76 KB

PlacementBuddy📊

A Simple HTTP(REST) API to make a dashboard like service for college placement. It helps keep a check of companies coming for recruitment.👩‍💻

Functionalities👾

VIEW

  • /dashboard view Welcome Dashboard

  • /company view All Companies and thier Info

you can view Company's name, Package, Selected students count, Ongoing or not

ADD

  • /company/{name} Add New Company

  • /company/{name}/{package} Add New Company and it's Annual Package

  • /selected/{id}/{selected} Add no of students selected by the company

UPDATE

  • /stop/{id} Change the status of hiring to : no more hiring!

  • /start/{id} Change the status of hiring to : now hiring!

  • /selected/{id}/{selected} Update no of students selected by the company

DELETE

  • /company/{id} Delete Company Info from the system using its ID

Installation🛠️

Dependencies : GO, Gofr, Docker, mysql

  1. Install Go modules

    go mod init folder-name/Placement-buddy

    go mod tidy

  2. Install Gofr modules

    go get gofr.dev/pkg/gofr

  3. Create DB

    You can run the mysql server and create a database locally using the following docker command:

    docker run --name placement-buddy -e MYSQL_ROOT_PASSWORD=root123 -e MYSQL_DATABASE=placement_buddy -p 3306:3306 -d mysql:8.0.30

  4. Create Table

    Access placment_buddy database and create table companies with columns id and name:

    docker exec -it placement-buddy mysql -uroot -proot123 placement_buddy -e "[SQL CODE FOR DB]"

    can check in your mysql workbench if avlbl

  5. RUN

    run your API using

    go run main.go

Testing🧪

try out APIs using Postman

Run In Postman

Unit Test

handler_test.go is made to test few of the functionalities of handler.go

More about the API📑

Database Structure

image

Sequence Diagram

image

Refer🔗

Go Official Documentaion

Gofr Official Documentaion

Gofr Github Repo

Thankyou!