A full-stack appliaction that lets users process images secruley and quickly. Features include user authentication, efficient image processing, and reliable cloud storage. The platform handles everything from upload to delivery while maintaing data integrity and providing fast retrieval times, all through an easy-to-use user interface.
- Complete user management with email verification system
- Secure password reset flow
- JWT token-based authentication
- User registration and account activation
- S3 bucket integration for scalable storage
- Redis caching for improved performance
- PostgreSQL metadata management
- 20 image count limit per user
- Resize images with Go image packages
- Crop functionality with proper aspect ratios
- Filter application via backend processing
- Image tinting capabilities
- Go - Main backend language
- Gin Framework - Web framework for Go
- PostgreSQL - Primary database
- Redis - Caching and rate limiting
- Amazon S3 - Image storage
- Docker - Containerization
- JWT - Authentication
- React - Frontend library
- TypeScript - Type safety
- Tailwind CSS - Styling
- Vite - Build tool
Method | Endpoint | Description |
---|---|---|
POST | /register | Create new user account |
POST | /login | Authenticate user |
POST | /verify-email | Verify user email address |
POST | /forgot-password | Request password reset |
POST | /reset-password | Set new password with token |
POST | /upload | Upload a new image |
GET | /images/:id | Retrieve an image |
GET | /images/count | Get user's image count |
DELETE | /images/:id | Delete an image |
- Docker and Docker Compose installed
- Git
-
Clone the repository
git clone https://github.com/justnsmith/image-processing-service.git cd image-processing-service
-
Switch to dev-local branch
git checkout dev-local
-
Set up environment variables
cp .env.example .env
Then edit
.env
with your specific configuration values. -
Start the application with Docker Compose
docker-compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
# Run backend only
cd backend
go run main.go
# Run frontend only
cd frontend
npm install
npm run dev
To deploy the application correctly, follow these steps:
- Make sure you've committed all your changes to your
local-dev
branch - Push your changes to the main branch:
# First switch to main branch git checkout main # Merge changes from local-dev branch git merge local-dev # Push changes to remote repository git push origin main
- Once the changes are in the main branch, deploy to Render
I went with Go because it's fast, simple, and handles multiple tasks at once really well. This is perfect for processing images iwthout eating up all the memory or CPU.
React lets me build with reusable pieces, which keeps things organized. TypeScript catches errors before they happen which saves a ton of debugging time and ensures type safety.
Postgres handles all of my user data and image info reliably. The JSON feature is also nice for storing flexible metadata.
Redis speeds everything up by remembering stuff that I use often, like images, login tokens, etc. It's also perfect for my worker queue system since it lets me process images in the background without making users have to wait.
S3 just works for storing images. It scales automatically and doesn't go down, so I don't have to worry about storage servers.
Docker makes sure that everything runs the same way everywhere. It doesn't matter if its the development machine or the server. Makes development way easier.