Skip to content

Nielk74/Minks-Lair

Repository files navigation

Cosmink Backend

Welcome to the backend service for Cosmink, a graphical insights analyzer. This project provides the server-side infrastructure, including user authentication, database interaction, and API handling, to support the visualization and analysis features of Cosmink.

Project Structure

The backend is organized into a modular and scalable structure:

├── auth
│   ├── core          
│   └── infra         
├── graph
│   ├── controller   
│   ├── core          
│   └── infra        
└── libs
    ├── database
    ├── route        
    └── utils      

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd cosmink-backend
  2. Install Go dependencies:

    go mod download
  3. Build the application:

    make build
  4. Run the application:

    make run

Docker

To build and run the application using Docker:

  1. Build the Docker image:

    make docker-build
  2. Run the Docker container:

    docker run -p 8080:8080 go-app:test

Database Migration

  1. Create a new migration:

    make create-migration name=<migration_name> db=<database_name>
  2. Apply migrations using migrate:

    migrate -database postgres://localhost:5432/<db_name> -path migrations up

Testing

Run unit tests:

make test

Run tests in Docker:

make docker-test

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature-name).
  3. Commit your changes (git commit -m 'Add feature').
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published