Titip.in is a modern web application designed to facilitate Jastip (buying services) and Preloved (second-hand) transactions. Built with speed and user experience in mind, it provides a seamless interface for users to browse, request, and manage their listings.
- Framework: React 18 with Vite
- Language: TypeScript
- Styling: Tailwind CSS & Shadcn UI
- State Management: Zustand
- Data Fetching: TanStack Query (React Query) v5
- Icons: Lucide React
- Animations: Tailwind Animate
- Jastip Marketplace: Browse and create buying service listings from various locations.
- Preloved Store: A dedicated space for high-quality second-hand goods.
- User Dashboard: Manage your own listings, requests, and profile.
- Advanced Search: Find specific items or services with ease.
- Image Management: Multi-image upload support for high-quality listings.
- Real-time Feedback: Interactive UI with Sonner toasts and Radix UI components.
-
Clone the repository:
git clone https://github.com/titip-in/titip-in-web-fe.git cd titip-in-web-fe -
Install dependencies:
npm install
-
Set up Environment Variables: Copy
.env.exampleto.envand adjust the values.cp .env.example .env
Main variables:
VITE_API_URL: The base URL of your backend API.VITE_APP_NAME: The name of the application.
-
Run development server:
npm run dev
To create an optimized production build:
npm run buildThe output will be in the dist/ directory.
This project is equipped with a robust CI/CD pipeline using Jenkins and Docker.
The Dockerfile uses a multi-stage build:
- Builder Stage: Uses
node:20-alpineto build the Vite app. - Production Stage: Uses
nginx:alpineto serve the static assets with a custom configuration for SPA support (React Router).
The Jenkinsfile automates the following stages:
- Install & Test: Lints the code and checks for TypeScript errors.
- Build Docker Image: Builds the image with necessary
build-args. - Push to Docker Hub: Pushes the versioned image.
- Deploy to EC2: Automatically updates the running container on the AWS EC2 instance.
Pipeline trigger validation: documentation-only updates should still run the CI/CD checks.
src/
├── @/ # Shadcn UI components
├── components/ # Reusable UI & Layout components
├── hooks/ # Custom React hooks
├── lib/ # API configurations (Axios) & Utils
├── pages/ # Page-level components
├── stores/ # Zustand state management
├── types/ # TypeScript interfaces & types
└── main.tsx # Application entry point
This project is private and for internal use only.