Skip to content

itallix/gophkeeper

Repository files navigation

GophKeeper

Tests Lint codecov Release Go Report Card License

Gophkeeper Client

A secure and reliable client-server system for storing sensitive information, written in Go. GophKeeper provides encrypted storage for various types of data including credentials, binary files, text notes, and more.

Features

  • πŸ” Secure user authentication
  • πŸ“ Binary file storage and retrieval
  • πŸ”„ Cross-platform support (Linux, macOS, Windows)
  • πŸ”’ End-to-end encryption
  • πŸš€ High-performance gRPC communication
  • πŸ’Ύ Reliable PostgreSQL storage backend
  • ☁️ S3-compatible object storage support

Installation

Prerequisites

  • Go 1.23 or higher
  • PostgreSQL
  • Docker

Building from Source

  1. Clone the repository:
git clone https://github.com/itallix/gophkeeper.git
cd gophkeeper
  1. Build the client and server:
make all       # Build CLI for all platforms
# or
make linux     # Build CLI for linux platform

Docker Installation

make up        # Start Docker containers
make down      # Stop Docker containers

Quick Start

  1. Start the server:
make server
./bin/server
  1. Setup the client:
# For Linux AMD64
make linux
mv ./bin/cli-linux-amd64 ./bin/cli
# For other platforms, use appropriate binary
  1. Register and authenticate:
./bin/cli user register -l <username>
./bin/cli user auth -l <username>

Usage Guide

Command Structure

All commands follow the pattern:

./bin/cli <category> <action> [options]

Most commands require the -p (path) parameter as a reference to the secret. Binary retrieval operation use -f (filepath) for the source file path.

User Management

# Register a new user
./bin/cli user register -l adam

# Authenticate user
./bin/cli user auth -l adam

Binary Operations

# Upload a binary file
./bin/cli binary create -f path/to/file.mp4

# List all stored binaries
./bin/cli binary list

# Retrieve a binary file
./bin/cli binary get -p original_name.mp4 -o output_name.mp4

# Delete a binary file
./bin/cli binary delete -p filename.mp4

Flags Reference

Flag Description Used With
-p Path/reference to the secret Most commands
-f Source file path Binary creation
-o Output file path Binary retrieval
-l Username User operations

Project Structure

.
β”œβ”€β”€ cmd/
β”‚   β”œβ”€β”€ client/        # Client application
β”‚   └── server/        # Server application
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ client/        # Client logic
β”‚   β”œβ”€β”€ server/        # Server logic
β”‚   └── common/        # Shared code
β”œβ”€β”€ pkg/
β”‚   └── generated/     # Generated protobuf code
β”œβ”€β”€ api/
β”‚   └── proto/         # Protocol buffer definitions
└── db/
    └── migrations/    # Database migrations

Development

Running Tests

make test

Database Migrations

make migrate-up     # Apply migrations
make migrate-down   # Rollback migrations

Generate Protocol Buffers

make proto

Security Considerations

  • All data is encrypted before storage
  • Communication is secured via gRPC with TLS
  • Passwords are hashed using modern algorithms

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

A client-server system designed to securely and reliably store users' sensitive information written in Go

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors