A modern photo gallery application built with Go, allowing users to create and manage photo galleries. Users can sign up, create galleries, upload photos, and share their galleries with others.
- 🔐 User authentication (signup, signin, signout)
- 📸 Create and manage photo galleries
- 🖼️ Upload and manage images
- 🌓 Dark/Light theme support
- 🔒 Protected routes and resources
- 🗃️ PostgreSQL database integration
- 🖥️ Docker support for development
- 🚀 Heroku deployment ready
- Go 1.21 or later
- Docker and Docker Compose
- PostgreSQL client (for database access)
- Make (for running commands)
- Clone the repository
git clone https://github.com/enlistedmango/lenslocked.git
cd lenslocked- Set up environment variables
cp .env.example .env
# Edit .env with your configuration:
# - Database settings
# - CSRF key
# - Session key
# - FiveManage API key- Start the application with Docker
make docker-build # Build the Docker images
make docker-run # Start the applicationThe application will be available at http://localhost:3000
# Start only the database
make local-db
# Run the application locally
make run# Run all tests
make test-all
# Run specific tests
make test-local # Test local environment
make test-prod # Test production environment
make test-integration # Run integration tests- Create and configure Railway app
# Create new Railway app
make railway-create
# Configure environment variables
make railway-config
# Set your FiveManage API key
railway variables set FIVEMANAGE_API_KEY=your-key-here- Deploy
make deploy-prod# Build images
make docker-build
# Start services
make docker-run
# Stop services
make docker-down
# View logs
docker-compose logs.
├── controllers/ # Request handlers
├── middleware/ # HTTP middleware
├── models/ # Database models
├── services/ # Business logic
├── templates/ # HTML templates
├── views/ # View rendering logic
├── migrations/ # Database migrations
├── scripts/ # Utility scripts
└── static/ # Static assets
The project includes comprehensive testing:
- Local Environment Tests: Verify Docker services, database connection, and web service functionality
- Integration Tests: Test all endpoints and their expected behaviors
- Production Tests: Verify Heroku deployment and production environment
- GitHub Actions: Automated testing on push and pull requests
This project is licensed under the MIT License - see the LICENSE file for details.
- Based on usegolang.com course by Jon Calhoun
- Extended with additional features:
- Docker support
- Dark/Light theme
- Automated testing
- CI/CD pipeline