GoLink is a URL shortener service built with Go and React.
- Clone the repository:
git clone https://github.com/Okabe-Junya/golink.git
cd golink- Set up environment variables:
cp .env.example .env- Update the
.envfile with your configuration:
- Set
FIREBASE_CREDENTIALS_JSONorFIREBASE_CREDENTIALS_FILEfor Firebase authentication - Adjust other variables as needed
- Start the application:
docker compose upThe application will be available at:
- Frontend: http://localhost:3001
- Backend: http://localhost:8080
- Firestore Emulator: localhost:8081
The backend is written in Go and uses:
- Gin web framework
- Firebase/Firestore for data storage
- Docker for containerization
To run backend tests:
cd backend
make testThe frontend is built with:
- React
- TypeScript
- Tailwind CSS
To run frontend tests:
cd frontend
npm install
npm test| Variable | Description | Default |
|---|---|---|
| FIREBASE_CREDENTIALS_JSON | Firebase credentials in JSON format | - |
| FIREBASE_CREDENTIALS_FILE | Path to Firebase credentials file | path/to/serviceAccountKey.json |
| APP_DOMAIN | Application domain | localhost |
| PORT | Backend port | 8080 |
| FRONTEND_PORT | Frontend port | 3001 |
| BACKEND_PORT | Backend port (for Docker) | 8080 |
| FIRESTORE_EMULATOR_HOST | Firestore emulator host | firestore:8081 |
| GOOGLE_CLOUD_PROJECT | GCP project ID | golink-local |
This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3.