A secure and scalable password manager built with Go.
password-manager/
│── cmd/ # Main application entry points
│ ├── server/ # Main API server (REST)
│── internal/ # Private app logic
│ ├── auth/ # Authentication & encryption logic
│ ├── config/ # Configuration management
│ ├── database/ # MySQL connection & migrations
│ ├── models/ # Database entities
│ ├── repository/ # Data access layer
│ ├── services/ # Business logic
│ ├── sync/ # Hybrid sync logic
│ ├── worker/ # Background workers
│── pkg/ # Public utility packages
│── api/ # OpenAPI specs
│── web/ # Static files
│── scripts/ # DevOps scripts
│── test/ # Integration and unit tests
- Clone the repository
- Copy
.env.exampleto.envand configure your environment variables - Run
go mod downloadto install dependencies - Start the server with
go run cmd/server/main.go
Visit http://localhost:8080/swagger/index.html to view the API documentation
make build # Build the application
make run # Run the application
make test # Run tests
make clean # Clean build files
make lint # Run go fmt and go vet
make docker-build # Build Docker image
make docker-run # Run Docker container
make help # Show available commandsTo generate or update the API documentation:
- Ensure you have the
swagtool installed:
go install github.com/swaggo/swag/cmd/swag@latest- Generate or update the API documentation:
go run github.com/swaggo/swag/cmd/swag@latest init -g cmd/server/main.go -o api/docs- Go 1.21+
- MySQL
- Docker (optional)