Skip to content

szarbartosz/hedgeapp-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

hedgeapp backend πŸ¦”

Backend of an application created to streamline and enhance the inventory processes for individuals and teams managing green areas.

tech stack πŸ”§

Go Gin Postgresql Docker

dev quickstart 🚧

$ docker compose up --build -d

project structure 🌳

.
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ README.md
β”œβ”€β”€ controllers
β”‚Β Β  β”œβ”€β”€ investorsController.go
β”‚Β Β  β”œβ”€β”€ locationsController.go
β”‚Β Β  β”œβ”€β”€ officeController.go
β”‚Β Β  β”œβ”€β”€ statusesController.go
β”‚Β Β  └── usersController.go
β”œβ”€β”€ docker-compose.yaml
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ initializers
β”‚Β Β  β”œβ”€β”€ dbConnector.go
β”‚Β Β  β”œβ”€β”€ dbSeeder.go
β”‚Β Β  β”œβ”€β”€ dbSynchronizer.go
β”‚Β Β  β”œβ”€β”€ envVariablesLoader.go
β”‚Β Β  └── seeds
β”‚Β Β      β”œβ”€β”€ offices.json
β”‚Β Β      └── statuses.json
β”œβ”€β”€ main.go
β”œβ”€β”€ middleware
β”‚Β Β  β”œβ”€β”€ handleCORS.go
β”‚Β Β  └── requireAuth.go
β”œβ”€β”€ models
β”‚Β Β  β”œβ”€β”€ addressModel.go
β”‚Β Β  β”œβ”€β”€ applicationModel.go
β”‚Β Β  β”œβ”€β”€ authModel.go
β”‚Β Β  β”œβ”€β”€ commonModel.go
β”‚Β Β  β”œβ”€β”€ investorModel.go
β”‚Β Β  β”œβ”€β”€ locationModel.go
β”‚Β Β  β”œβ”€β”€ noteModel.go
β”‚Β Β  β”œβ”€β”€ officeModel.go
β”‚Β Β  β”œβ”€β”€ statusModel.go
β”‚Β Β  └── userModel.go
β”œβ”€β”€ test
β”œβ”€β”€ tmp
└── validators
    └── usersValidator.go

api endpoints πŸ“–

Auth

register

POST /register
{
  email: string,
  password: string
}

login

POST /login
{
  email: string,
  password: string
}

validate

GET /validate

delete user

DELETE /users
Statuses

get statuses

GET /statuses

create status

POST /statuses
{
  name: string;
}

update status

PUT /statuses/:id
{
  name: string;
}

delete status

DELETE /statuses/:id
Investor

get investors

GET /investors

get single investor

GET /investors/:id

create investor

POST /investors
{
  name: string,
  contactPerson: string,
  phone: string,
  email: string,
  nip: string,
  regon: string,
  address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  }
}

update investor

PUT /investors/:id
{
  name: string,
  contactPerson: string,
  phone: string,
  email: string,
  nip: string,
  regon: string,
  address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  }
}

delete investor

DELETE /investors/:id
Offices

get offices

GET /offices

get single office

GET /offices/:id

create office

POST /offices
{
  name: string,
    address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  }
}

update office

PUT /offices/:id
{
  name: string,
  address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  }
}

delete office

DELETE /offices/:id
Locations

get locations

GET /locations

get single location

GET /locations/:id

create location

POST /locations
{
  name: string,
  issueDate: string, // ISO 8601
  inspectionDate: string, // ISO 8601
  deforestationDate: string, // ISO 8601
  plantingDate: string, // ISO 8601
  deforestationDone: boolean,
  plantingDone: boolean,
  address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  },
  statusId: int,
  investorId: int,
}

update location

PUT /locations/:id
{
  name: string,
  issueDate: string, // ISO 8601
  inspectionDate: string, // ISO 8601
  deforestationDate: string, // ISO 8601
  plantingDate: string, // ISO 8601
  deforestationDone: boolean,
  plantingDone: boolean,
  address: {
    city: string,
    street: string,
    number: string,
    zipCode: string
  },
  statusId: int,
  investorId: int,
}

delete location

DELETE /locations/:id

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published