A full-stack social media application for sharing flowers and connecting with others.
- Frontend: flower-sharing.vercel.app
- Backend API: flower-sharing.zeabur.app
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS 4
- State Management: Zustand
- Data Fetching: TanStack Query (React Query)
- Forms: React Hook Form + Zod
- UI Components: shadcn/ui, Radix UI
- Language: Go 1.24.5
- Framework: Gin
- Database: MySQL (via GORM)
- Authentication: JWT + OAuth2
- File Storage: Cloudinary
- Documentation: Swagger
- Logging: Zap
flower-sharing/
├── frontend/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility libraries
│ │ ├── service/ # API service layer
│ │ ├── store/ # Zustand stores
│ │ └── types/ # TypeScript type definitions
│ └── package.json
│
└── backend/ # Go backend API
├── controllers/ # HTTP handlers
├── services/ # Business logic
├── repositories/ # Data access layer
├── models/ # Database models
├── middlewares/ # HTTP middlewares
├── routes/ # API routes
├── dto/ # Data transfer objects
└── go.mod
- Node.js 20+ (for frontend)
- Go 1.24.5+ (for backend)
- MySQL database
- Cloudinary account (for image uploads)
- Navigate to the frontend directory:
cd frontend- Install dependencies:
bun install
# or
npm install- Create a
.env.localfile with your environment variables:
NEXT_PUBLIC_API_URL=http://localhost:8080
# Add other environment variables as needed- Run the development server:
bun dev
# or
npm run dev- Open http://localhost:3000 in your browser.
- Navigate to the backend directory:
cd backend- Install dependencies:
go mod download- Create a
.envfile with your environment variables:
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_user
DB_PASSWORD=your_password
DB_NAME=flower_sharing
JWT_SECRET=your_jwt_secret
CLOUDINARY_URL=your_cloudinary_url
# Add other environment variables as needed- Run the server:
go run main.go- API will be available at http://localhost:8080
- Swagger documentation at http://localhost:8080/swagger/index.html
- User authentication (JWT + OAuth2)
- User profiles and following system
- Post creation and management
- Image uploads via Cloudinary
- Admin panel for user and post management
- Responsive design with dark mode support
bun dev- Start development serverbun build- Build for productionbun start- Start production serverbun lint- Run ESLint
go run main.go- Run development servergo build- Build binaryswag init- Generate Swagger documentation