SkillHive is a full-stack MERN application inspired by Fiverr, designed to connect freelancers (sellers) with clients (buyers). It features a robust microservices-ready architecture, secure authentication, and a modern React frontend.
- Authentication & Security:
- JWT-based Auth with Refresh Token Rotation.
- HttpOnly Cookies for secure token storage.
- Role-Based Access Control (RBAC) for Buyers, Sellers, and Admins.
- BCrypt password hashing.
- Gigs & Marketplace:
- Create, Edit, Delete Gigs (Sellers only).
- Advanced Filtering (Category, Price, Sorting) & Search.
- Lazy Loading & Skeleton Loaders for performance.
- React Query for efficient data fetching and caching.
- Orders & Payments:
- Stripe Integration (Payment Intents).
- Order lifecycle management.
- Communication:
- Real-time messaging system (ready for Socket.io integration).
- Reviews:
- Star ratings and text reviews.
- DevOps & tooling:
- Docker support for containerized deployment.
- CI/CD with GitHub Actions.
- Swagger API Documentation.
- Jest Unit Testing.
- React.js (Vite)
- SASS for styling
- TanStack Query (React Query) for state management
- Axios with Interceptors
- React Router DOM (Lazy Loading implemented)
- Node.js & Express.js
- MongoDB & Mongoose
- JWT (JSON Web Tokens)
- Joi Validation
- Winston Logger
- Docker & Docker Compose
- GitHub Actions
- Nginx (Frontend serving)
- Node.js v18+
- MongoDB (Local or Atlas)
- Docker (Optional)
-
Clone the repository
git clone https://github.com/yourusername/skillhive.git cd skillhive -
Backend Setup
cd api npm install # Rename .env.example to .env and configure variables npm start
-
Frontend Setup
cd frontened npm install npm run dev
Run the entire stack with a single command:
docker-compose up --buildAccess the app at http://localhost:5173.
Swagger UI is available at:
http://localhost:8800/api/v1/docs
Run backend unit tests:
cd api
npm testThe project includes a GitHub Actions workflow (pipeline.yml) that automatically:
- Installs dependencies.
- Builds the Frontend.
- Runs Backend tests.
- Login: User sends credentials. Server validates and instantiates
accessToken(short-lived) andrefreshToken(long-lived). Both are sent as HttpOnly Cookies. - Access: Frontend uses
axiosClientto attach credentials automatically. - Refresh: If
accessTokenexpires (401), the frontend interceptor calls/auth/refresh. Server verifiesrefreshToken, rotates it, and issues new tokens transparently. - Persistence: On app load,
AuthContextcalls/auth/meto restore session.
ISC