A modern, full-featured URL shortener web application built with Node.js, Express, MongoDB, and Vue 3 (SPA). Easily create, manage, and analyze short links with user authentication and professional analytics dashboards.
See demo here.
- Backend: Node.js, Express.js, MongoDB (Mongoose), Passport.js, express-session, bcryptjs
- Frontend: Vue 3 (Vite), Pinia, Vue Router, Tailwind CSS, Chart.js (vue-chartjs)
- Other Libraries: shortid, validator, dotenv
backend/
- Express API server, authentication, MongoDB models, API routesserver.js
- Main Express servermodels/
- Mongoose models for User and URLroutes/
- Express route files for API endpoints
frontend/
- Vue 3 SPA (Vite, Tailwind, Pinia, etc.)src/
- Vue components, stores, stylespublic/
- Static assets (favicon, etc.)dist/
- Production build output (afternpm run build
)
git clone https://github.com/jdamacena/url-shortner.git
cd url-shortner
cd backend
npm install
- Copy
.env.example
to.env
and set your environment variables:MONGODB_URI=mongodb://localhost:27017/url_shortener SESSION_SECRET=your_session_secret_here PORT=3000
- Start the server:
npm start # or for auto-reload: npm run dev
- Visit http://localhost:3000
cd frontend
npm install
npm run dev
# App runs at http://localhost:5173 (or as shown in terminal)
npm run build
The output will be in the dist/
folder.
npm run preview