GoShare is a Go-based API framework for building file sharing applications. It provides a starting point with essential features like user authentication, file management, and a basic API structure, allowing you to focus on your specific application requirements.
- User Authentication: Secure user registration and login with password hashing and JWT-based authentication.
- File Management: Create, read, update, and delete file metadata, with authorization checks to ensure data security.
- API Structure: Provides a basic RESTful API structure, making it easy to extend with additional endpoints.
- Database Integration: Uses GORM for seamless interaction with a PostgreSQL database.
- Go 1.16 or later
- PostgreSQL
-
Clone the repository:
git clone https://github.com/Sambit003/go-share.git cd go-share
-
Install dependencies:
go get github.com/golang-jwt/jwt/v5 go get github.com/go-playground/validator/v10 go get github.com/gorilla/mux go get gorm.io/driver/postgres go get gorm.io/gorm
-
Configure
config.yaml
: Create aconfig.yaml
file in the project root directory and set the following:database: host: your_db_host port: your_db_port user: your_db_user password: your_db_password name: your_db_name
-
Run the server:
go run main.go
- User authentication (registration and login).
- File metadata management (CRUD operations).
- Basic RESTful API structure.
- Database integration with GORM (PostgreSQL).
- Code refactoring for best practices and readability.
- File storage implementation (local or cloud storage).
- Detailed API endpoint design and documentation.
- Rate limiting to prevent abuse.
- Metrics and monitoring setup.
- Production-ready deployment (Docker, etc.).
- Security hardening.
Contributions are welcome! To contribute to GoShare:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear and concise commit messages.
- Push your branch to your fork.
- Open a pull request.
Please follow Go coding conventions and ensure that your code is well-tested.