Skip to content

m3yevn/ftp-seer-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FTP Seer API - FTP Directory Browser Backend ๐Ÿ“ฆ

Version 3.0.1 - Developed by Kevin Moe Myint Myat (m3yevn)

A backend API server for browsing FTP server directories. Accepts host, port, path, username, and password parameters via REST API to connect to FTP servers and return directory data.

๐ŸŒ ไธญๆ–‡็‰ˆๆœฌ: ็ฎ€ไฝ“ไธญๆ–‡ README

๐Ÿš€ Key Features

  • โœ… RESTful API: Simple HTTP interface
  • โœ… Anonymous FTP Support: Works with anonymous FTP servers
  • โœ… Directory Browsing: List FTP server directory contents
  • โœ… File Download: Get FTP server file content
  • โœ… Vercel Deployment: Production-ready Vercel deployment
  • โœ… SEO Optimized: Complete search engine optimization
  • โœ… Responsive Design: Works on desktop and mobile
  • โœ… Controller-Service Pattern: Clean, maintainable architecture

๐ŸŒ Live Demo

Live Demo

Try it now: https://ftp-seer-api.vercel.app

๐Ÿ“ฆ Docker Deployment

FTP Seer API server is also available as a Docker image.

Docker

$ docker pull m3yevn/ftp-seer:latest
$ docker run -d --name ftp-seer -p 5050:5050 m3yevn/ftp-seer:latest

Now, FTP Seer is accessible at port 5050 of your workstation.

๐Ÿ“‹ API Parameters

Required Parameters

  • host: FTP server hostname
  • path: Path to browse

Optional Parameters

  • port: FTP port (default: 21)
  • username: Username (optional for anonymous FTP)
  • password: Password (optional for anonymous FTP)

๐Ÿ”— API Endpoints

Directory Browsing

GET /api/directory?host=ftp.drivehq.com&path=.

File Retrieval

GET /api/file?host=ftp.drivehq.com&path=ftp_help.htm

๐Ÿ“ Sample Requests

Browse Directory

curl "https://ftp-seer-api.vercel.app/api/directory?host=ftp.drivehq.com&path=."

Get File Content

curl "https://ftp-seer-api.vercel.app/api/file?host=ftp.drivehq.com&path=ftp_help.htm"

๐Ÿ› ๏ธ Tech Stack

  • Node.js
  • Express.js - Web framework
  • JSFTP - FTP client library
  • Loglestial - Advanced logging system
  • PureCSS - CSS framework
  • Vercel - Deployment platform

๐Ÿ—๏ธ Architecture

The project follows a Controller-Service pattern for better maintainability:

  • Controllers (/controller/) - Handle HTTP requests and responses
  • Services (/services/) - Contain business logic and FTP operations
  • Utils (/utils/) - Shared utilities like logging
  • Config (/config/) - Application configuration

Project Structure

ftp-seer-api/
โ”œโ”€โ”€ controller/          # Request handlers
โ”œโ”€โ”€ services/            # Business logic
โ”œโ”€โ”€ utils/              # Shared utilities
โ”œโ”€โ”€ config/             # Configuration
โ”œโ”€โ”€ public/             # Static files
โ”œโ”€โ”€ routes.js           # Route definitions
โ”œโ”€โ”€ index.js            # Application entry point
โ”œโ”€โ”€ vercel.json         # Vercel configuration
โ””โ”€โ”€ package.json        # Dependencies

๐Ÿš€ Vercel Deployment

This project is optimized for Vercel deployment:

# Install Vercel CLI
npm install -g vercel

# Deploy to Vercel
vercel

# Deploy to production
vercel --prod

Vercel Configuration

  • Runtime: Node.js
  • Build Command: Automatic
  • Output Directory: Root
  • Install Command: npm install

๐Ÿ“Š HTTP Methods

Method Route Description
GET / Get API health status
GET /api/directory Browse FTP server directory
GET /api/file Get FTP server file content

๐Ÿ”ง Environment Variables

PORT=5050
NODE_ENV=development
LOG_LEVEL=info
VERCEL=1

๐Ÿš€ Local Development

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/m3yevn/ftp-seer.git
cd ftp-seer

# Install dependencies
npm install

# Start the development server
npm start

The server will start at http://localhost:5050

๐Ÿ“ˆ Version History

v3.0.1 (December 19, 2024)

  • ๐Ÿ—๏ธ Architecture: Refactored to Controller-Service pattern
  • ๐Ÿ“ Logging: Integrated Loglestial logging system
  • ๐Ÿš€ Deployment: Vercel deployment optimization
  • ๐Ÿ” SEO: Complete SEO optimization with structured data
  • ๐ŸŽจ UI/UX: Improved user interface with radio buttons
  • ๐Ÿ› ๏ธ Tech Stack: Updated dependencies and removed legacy code
  • ๐ŸŒ Frontend: Responsive design and loading states
  • ๐Ÿ”ง API: Anonymous FTP support and better error handling

Previous Versions

  • v2.1.0: Basic FTP functionality with Winston logging
  • v1.0.0: Initial release with CircleCI deployment

๐Ÿ‘ค Author

Kevin Moe Myint Myat (m3yevn)

๐Ÿ“„ License

MIT License - see LICENSE file for details

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ”— Related Links

๐ŸŒ Internationalization

Read this in Simplified Chinese - ็œ‹็ฎ€ไฝ“ไธญๆ–‡็‰ˆๆœฌ README.zh-cn

About

๐Ÿ”˜ FTP Seer API : A backend server for browsing FTP directory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6