NanoLink is a fast, minimal, and efficient URL shortener stack built with modern web technologies. It provides a seamless way to convert long URLs into clean, manageable, and trackable short links.
- React 19 - UI Library
- Vite - Next Generation Frontend Tooling
- TypeScript - Static Typing
- Axios - Promise-based HTTP client
- Node.js - Runtime Environment
- Express 5 - Web Framework
- Mongoose - MongoDB Object Modeling
- NanoID - Tiny, secure URL-friendly unique string ID generator
- TypeScript - Static Typing
A clean, modular architecture separating the frontend client from the backend API.
NanoLink/
├── client/ # React + Vite Frontend
│ ├── src/
│ │ ├── assets/ # Static images, SVGs, etc.
│ │ ├── pages/ # React route components
│ │ ├── services/ # API integration logic
│ │ ├── App.tsx # Main application component
│ │ └── main.tsx # React entry point
│ └── package.json
└── server/ # Node.js + Express Backend
├── src/
│ ├── controllers/ # Route handlers
│ ├── interfaces/ # TypeScript types & models
│ ├── routes/ # Express API routes
│ ├── services/ # Business logic layer
│ ├── utils/ # Helper functions
│ ├── app.ts # Express configuration
│ └── server.ts # Backend entry point
├── .env # Environment variables (Create this)
└── package.json
Follow these steps to get the full stack running on your local machine.
git clone https://github.com/your-username/NanoLink.git
cd NanoLink- Navigate to the server directory:
cd server - Install the required backend dependencies:
npm install
- Set up your environment variables. Create a
.envfile in theserverfolder:PORT=5000 MONGODB_URI=your_mongodb_connection_string
- Start the backend development server:
The server should now be running on
npm run dev
http://localhost:5000.
- Open a new terminal window/tab and navigate to the client directory:
cd client - Install the required frontend dependencies:
npm install
- Start the Vite development server:
The app should now be running on your local port, typically
npm run dev
http://localhost:5173.
💡 Tip: Ensure the backend is running simultaneously with the frontend so API calls resolve correctly!
npm run dev- Starts the Vite development servernpm run build- Builds the app for productionnpm run lint- Runs ESLint to check for code issuesnpm run preview- Previews the production build locally
npm run dev- Starts the server in development mode usingts-node-devnpm run build- Compiles TypeScript to JavaScriptnpm run start- Starts the compiled production server
Contributions are always welcome! Feel free to open an issue or submit a pull request if you have ideas for improvements or find any bugs.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the ISC License.