Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cloud-image-uploader

📸 PixelDrop - Fullstack Cloud Image Uploader

A lightweight, modern full-stack web application that allows users to upload images alongside descriptions. Images are handled via binary streams, processed in memory, and instantly served through ImageKit's global CDN, with all meta-data securely stored in MongoDB.


🚀 Key Features

  • In-Memory Streams: Utilizes multer.memoryStorage() to handle multipart file buffers without writing junk text files to server disks.
  • ImageKit Integration: Native SDK processing for raw buffers to deliver ultra-fast CDN asset paths.
  • Dynamic Community Feed: Responsive card grid UI that handles single or multi-post arrays seamlessly using Axios.
  • Secure Architecture: Production-ready .gitignore mapping to fully protect operational environment parameters.

🛠️ Tech Stack

  • Frontend: React.js, Vite, React Router DOM v6, Axios
  • Backend: Node.js, Express.js, Multer
  • Database: MongoDB (Mongoose ODM)
  • Cloud Storage: ImageKit.io CDN

📁 Repository Structure

my-project-root/
├── backend/
│   ├── src/
│   │   ├── models/post.model.js      # Mongoose Schema
│   │   ├── services/post.service.js  # ImageKit CDN Engine
│   │   └── app.js                    # Express Application API Routing
│   ├── .env                           # Environment Variables (Ignored via git)
│   └── package.json
└── frontend/
    ├── src/
    │   ├── pages/
    │   │   ├── CreatePost.jsx        # Multi-part Payload Upload Form
    │   │   └── PostFeed.jsx          # Live Card Grid Feed Component
    │   ├── App.jsx                   # React Router Context Setup
    │   └── index.css                 # Clean Minimal Layout Styling
    └── package.json

⚙️ Getting Started

1. Prerequisites

  • Node.js installed locally.
  • A free account on ImageKit.io.
  • A running MongoDB instance (Local Community Server or Atlas Cloud).

2. Environment Setup

Create a .env file in the root of your backend/ folder:

public_key=your_imagekit_public_key
private_key=your_imagekit_private_key
url_key=https://imagekit.io

3. Running the Application

Step A: Spin Up the Backend Server

cd backend
npm install
node server.js

Expected console output: the server is running on port no 3000

Step B: Launch the React Client

cd ../frontend
npm install
npm run dev

Expected browser interface running on: http://localhost:5173


📡 API Endpoints (Backend Reference)

HTTP Method Route Description Multipart Form Fields
POST /create-post Processes binary buffer, uploads to CDN, saves to DB. image (File), description (Text)
GET /posts Pulls collection array to populate feed components. None

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages