A modern marketplace application that enables users to swap items seamlessly across multiple platforms.
- Next.js - React framework for production
- React - JavaScript library for building user interfaces
- TailwindCSS - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- Express.js - Fast, unopinionated web framework for Node.js
- MongoDB - NoSQL database for flexible data storage
- Node.js - JavaScript runtime environment
- React Native - Cross-platform mobile development framework
- Appwrite - Backend-as-a-Service platform
- JWT - JSON Web Tokens for authentication
- Mongoose - MongoDB object modeling for Node.js
Swapify/
βββ swapify_frontend/ # Next.js web application
βββ swapify_backend/ # Express.js API server
βββ swapify_app/ # React Native mobile app
βββ README.md # This file
- User Authentication - Secure login/registration with JWT tokens
- Google OAuth - Social login integration
- Listing Management - Create, edit, and delete marketplace listings
- Location-Based Search - Find items nearby using geolocation
- Real-time Chat - Message other users about listings
- Image Upload - Upload and manage listing photos
- Profile Management - User profiles and settings
- Mobile App - Cross-platform mobile experience
- PWA Support - Progressive Web App capabilities
- Responsive Design - Works on all device sizes
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- Git
- Navigate to the backend directory:
cd swapify_backend- Install dependencies:
npm install- Create a
.envfile:
MONGODB_URI=mongodb://localhost:27017/swapify
JWT_SECRET=your_jwt_secret_here
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_password- Start the server:
npm start- Navigate to the frontend directory:
cd swapify_frontend- Install dependencies:
npm install- Create a
.env.localfile:
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_APPWRITE_ENDPOINT=your_appwrite_endpoint
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_appwrite_project_id
NEXT_PUBLIC_APPWRITE_BUCKET_ID=your_appwrite_bucket_id
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret- Start the development server:
npm run dev- Navigate to the mobile app directory:
cd swapify_app- Install dependencies:
npm install- For iOS:
cd ios && pod install && cd ..
npx react-native run-ios- For Android:
npx react-native run-androidPOST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/forgot-password- Password reset requestPOST /api/auth/reset-password- Password reset
GET /api/listings- Get all listingsGET /api/listings/:id- Get single listingPOST /api/listings- Create new listingPUT /api/listings/:id- Update listingDELETE /api/listings/:id- Delete listingGET /api/listings/nearby- Get nearby listings
GET /api/user/:id- Get user profilePUT /api/user/:id- Update user profileGET /api/my-listings- Get user's listings
GET /api/chat- Get user's chatsPOST /api/chat- Create new chatGET /api/chat/:id- Get chat messages
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintnpm start # Start server
npm run dev # Start with nodemonnpm start # Start Metro bundler
npm run android # Run on Android
npm run ios # Run on iOS- Cross-platform compatibility (iOS & Android)
- Native performance with React Native
- Push notifications
- Camera integration for listing photos
- GPS location services
- Offline capability
- JWT-based authentication
- Password hashing with bcrypt
- Input validation and sanitization
- Protected routes and middleware
- CORS configuration
- Rate limiting
- Modern, responsive design
- Dark/light mode support
- Smooth animations and transitions
- Mobile-first approach
- Accessibility compliance
- PWA capabilities
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Frontend Development: Next.js, React, TailwindCSS
- Backend Development: Express.js, MongoDB, Node.js
- Mobile Development: React Native
- Authentication: JWT, Google OAuth
- Database: MongoDB with Mongoose
If you have any questions or need help with setup, please open an issue or contact the development team.
Happy Swapping! π