module
0.0.0-20250208002407-e5b127dcee4e
Repository: https://github.com/csusmgdsc/csusmgdsc-api.git
Documentation: pkg.go.dev
# README
CSUSM GDSC API
The official API for the CSUSM Google Developer Student Club (GDSC) platform. This API handles user authentication, event management, and club-related operations.
๐ Features
- Event Management System
- User Management
- Role-based Access Control
- OAuth2 Authentication (Google & GitHub)
- JWT-based Session Management
๐ ๏ธ Tech Stack
- Go (1.23+)
- PostgreSQL
- Docker
- Echo Framework
- JWT Authentication
- OAuth2
๐ Prerequisites
๐ง Setup
- Clone the repository:
git clone https://github.com/csusmGDSC/csusmgdsc-api.git
cd csusmgdsc-api
- Create and configure your .env file:
cp .env.example .env
- Install dependencies:
go mod download
- Run the application:
go run ./cmd
๐ Project Structure
csusmgdsc-api/
โโโ cmd/ # Application entrypoint
โโโ config/ # Configuration management
โโโ internal/ # Internal application code
โ โโโ auth/ # Authentication system
โ โโโ handlers/ # Request handlers
โ โโโ db/ # Database operations
โ โโโ models/ # Database models
โโโ routes/ # API route definitions
โโโ .github/workflows/ # CI/CD workflow
๐ค Contributing
- Create your feature branch:
git checkout -b my-new-feature
- Make changes to the code
- Stage changes
git add .
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Development Guidelines
- Follow Go best practices and style guidelines
- Write tests for new features
- Update documentation as needed
- Use meaningful commit messages
๐ Environment Variables
DATABASE_URL= # PostgreSQL connection string
JWT_ACCESS_SECRET= # JWT access token secret
JWT_REFRESH_SECRET= # JWT refresh token secret
GITHUB_CLIENT_ID= # GitHub OAuth client ID
GITHUB_CLIENT_SECRET= # GitHub OAuth client secret
GOOGLE_CLIENT_ID= # Google OAuth client ID
GOOGLE_CLIENT_SECRET= # Google OAuth client secret
OAUTH_REDIRECT_URL= # OAuth callback URL
FRONTEND_ORIGIN= # Frontend application URL
๐งช Testing
Run tests: go test ./...
๐ฅ Contact
If you have any questions or need help, feel free to reach out to the GDSC team: