Skip to content

anishghanwat/TravelStory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TravelStoryAppFinal

A full-stack web application for capturing, managing, and sharing your personal travel stories. Users can register, log in, and create travel stories with images, locations, and dates. The app supports search, filtering, and favorites, providing a beautiful and modern user experience.


Features

  • User Authentication: Register and log in securely with JWT-based authentication.
  • Travel Story Management: Add, edit, delete, and view your travel stories.
  • Image Uploads: Attach images to your stories and manage uploads.
  • Favorites: Mark/unmark stories as favorites for quick access.
  • Search & Filter: Search stories by text or filter by date range.
  • Responsive UI: Modern, mobile-friendly interface built with React and Tailwind CSS.

Tech Stack

  • Frontend: React, Vite, Tailwind CSS, Axios, React Router, React Icons, React Day Picker, React Toastify, Moment.js
  • Backend: Node.js, Express, MongoDB, Mongoose, JWT, Multer, bcrypt

Project Structure

TravelStoryAppFinal/
  backend/         # Node.js/Express API
  frontend/        # React app (Vite)

Getting Started

Prerequisites

  • Node.js (v16+ recommended)
  • npm or yarn
  • MongoDB instance (local or cloud)

Backend Setup

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    npm install
  3. Create a .env file with the following:
    ACCESS_TOKEN_SECRET=your_jwt_secret
  4. Update config.json with your MongoDB connection string.
  5. Start the backend server:
    node index.js
    The backend runs on http://localhost:8000 by default.

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend/travel-story-app
  2. Install dependencies:
    npm install
  3. Start the frontend development server:
    npm run dev
    The frontend runs on http://localhost:5173 by default.

Usage

  1. Register a new account or log in with existing credentials.
  2. Add your travel stories with images, locations, and dates.
  3. Search, filter, and mark stories as favorites.
  4. Edit or delete your stories as needed.
  5. Log out securely when done.

API Endpoints (Backend)

  • POST /create-account — Register a new user
  • POST /login — User login
  • GET /get-user — Get current user info (JWT required)
  • POST /image-upload — Upload an image
  • DELETE /delete-image — Delete an uploaded image
  • POST /add-travel-story — Add a new travel story (JWT required)
  • GET /get-all-stories — Get all stories for the logged-in user
  • PUT /edit-story/:id — Edit a story (JWT required)
  • DELETE /delete-story/:id — Delete a story and its image (JWT required)
  • PUT /update-is-favourite/:id — Mark/unmark a story as favorite
  • GET /search — Search stories
  • GET /travel-stories/filter — Filter stories by date range

Contribution

Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.


License

This project is licensed under the MIT License.

About

A full-stack web app to capture and share your travel memories. Features include image uploads, favorites, filtering, and a beautiful UI. Built with React, Node.js, Express, and MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors