New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/grid-stream-org/api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/grid-stream-org/api

  • v0.0.0-20241127215126-c52137a3400b
  • Source
  • Go
  • Socket score

Version published
Created
Source

GridStream API

api to allow frontend to communicate with database

🧭 Table of Contents

  • API

👥 Team

Team MemberRole TitleDescription
Matthew CollettTechnical Lead/DeveloperFocus on architecture design and solving complex problems, with a focus on the micro-batching process.
Cooper DicksonProject Manager/DeveloperEnsure that the scope and timeline are feasible and overview project status, focus on UI and real-time transmission.
Eric CuenatScrum Master/DeveloperIn charge of agile methods for the team such as organizing meetings, removing blockers, and team communication, focus on UI and web socket interaction.
Sam KeaysProduct Owner/DeveloperManager of product backlog and updating board to reflect scope changes and requirements, focus on database operations and schema design.

🏗️ Directory Structure

api/
├── cmd/
│   └── api/
│       └── main.go
├── internal/
│   ├── app/
│   │   ├── handlers/
│   │   ├── middlewares/
│   │   ├── repositories/
│   │   ├── server/
│   │   │    └── routes.go
│   │   │    └── server.go
│   │   ├── models/
│   │   └── logic/
│   └── config/
│       └── config.go
├── pkg/
└── tests/
    ├── integration/
    └── unit/
  • cmd/api/main.go

    • Entry point of the application where we set up the HTTP server and wire up components. Runs HTTP server created by server.go in a goroutine.
  • internal/app Contains the core application logic, organized into subfolders

    • handlers/
      • Handle the HTTP request; validate schema, apply business logic from logic package (optional), uses repository package to insert and returns response.
    • middlewares/
      • Optional functions that can be applied to HTTP requests. For example, making sure a user is authenticated. (Adapter pattern).
    • repositories/
      • Data access layer that interacts directly with the database. Called from handler package and returns response.
    • logic/
      • Holds complex business logic that needs to be applied to data if necessary.
    • models/
      • Contains structs representing database schemas. Can be used to insert into database and validate schemas.
    • server/ Contains initialization for server and registering routes.
      • server.go
        • Creates and returns server struct for main.go to run. Calls routes.go to register routes for requests.
      • routes.go
        • Initializes router, registers routes and applies necessary middleware to requests. Called by server.go
  • internal/config/config.go

    • Holds Application configuration, such as database connection details, API keys, etc.
  • pkg

    • Holds reusuable libraries to be used accross different projects. Example, Firebase client, Big Query client, generic logger
  • tests

    • Unit and integration tests related to the application.

⛑️ Contributing

TODO

🚀 Local Run

TODO - update makefile

  • Navigate to root directory of repository
  • Run go mod download to download packages
  • Run make run to run api

Prerequisites

FAQs

Package last updated on 27 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc