TradeUp is a real-time chat-based web application that allows users to post items for sale and negotiate deals via direct messaging. Inspired by platforms like OLX, it integrates chat functionality with marketplace listings, focusing on simplicity and user engagement.
- ✅ User Authentication (Register/Login with JWT-based sessions)
- ✅ Post Items for Sale with image, price, and start chat option
- ✅ Chat Functionality (Start conversations, real-time messaging)
- ✅ Chat Sidebar showing active conversations
- ✅ Responsive and Minimal UI (basic responsive behavior)
- ✅ Secure JWT Handling and protected routes
- ✅ PostgreSQL for relational data storage
- ✅ Socket.io for real-time chat functionality
- ✅ Session persistence and error handling (like auto-redirect on expired JWT)
- ✅ Dynamic feed to browse all available items
| Technology | Purpose |
|---|---|
| Node.js | Backend runtime |
| Express.js | Web framework |
| EJS | Server-side rendering |
| PostgreSQL | Relational database |
| Socket.io | Real-time messaging |
| JWT (jsonwebtoken) | Authentication and session management |
| Render | Deployment platform |
| CSS (Custom) | Styling (basic responsiveness) |
- Register/Login to create an account.
- Post a new item for sale via your profile.
- Browse other users' listings on the feed.
- Start a chat with sellers/buyers to negotiate.
- View ongoing chats in the sidebar (on the chats screen) and chat in real-time.
- Node.js and npm
- PostgreSQL installed and running
npm installgit clone https://github.com/yourusername/tradeup.git- Create a new PostgreSQL database.
- Run schema setup (create users, items, chats, messages tables).
- Update .env
DB_USER="dbuser"
DB_HOST="dbhost"
DB_NAME="dbname"
DB_PASS="dbpass"
DB_PORT=5432
JWT_SECRET="yousecret"
NODE_ENV="development"
PORT=3000node appGo to http://localhost:3000 in your browser.
- App is deployed on Render.
- Environment variables are managed via Render Dashboard.
- SSL/TLS handled automatically in production with PostgreSQL and backend setup.
- JWT authentication to secure user sessions.
- Input validation to prevent SQL injections and malformed data.
- Secure WebSocket connection for real-time chats.
- ⚙️ Option to edit posts
- 📱 Mobile responsive design.
- 📸 Add image upload for items.
- 🔔 Real-time notifications for new messages and chat requests.
- ❤️ Wishlist/Save Items.
- 🔍 Search and filter functionality.
- ✨ Improve chat UX with typing indicators and message status.
- End-to-end authentication system with JWT & cookies.
- Real-time WebSocket communication with Socket.io.
- Handling production-specific configurations like SSL for PostgreSQL.
- Database schema design for marketplace and chat apps.
- Frontend and backend integration using EJS and REST API.


