Skip to content

A modern full-stack web app for transforming and saving text, featuring user authentication, secure storage, and a beautiful UI

License

Notifications You must be signed in to change notification settings

aryalbirat/Text-Utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextUtils - Smart Text Management Application

A modern full-stack web application for transforming and storing text with secure user authentication.

React Vite Tailwind CSS Node.js Express.js MongoDB JWT

✨ Features

  • 🔒 User Authentication

    • Secure registration & login system
    • Password hashing with bcrypt
    • JWT-protected routes
  • 📝 Text Transformation

    • Convert to uppercase/lowercase
    • Select all text with one click
    • Copy to clipboard
    • Character and word count
  • 💾 Text Management

    • Save transformed texts to your account
    • View all your saved texts
    • Update existing texts
    • Delete unwanted texts
  • 🛡️ Security

    • JWT authentication
    • Password hashing
    • API rate limiting
    • HTTP headers hardened with Helmet
  • 🎨 Modern UI

    • Responsive design with Tailwind CSS
    • Gradient styling and animations
    • Clean, intuitive interface

🛠️ Tech Stack

Backend

  • Node.js + Express
  • MongoDB + Mongoose
  • JWT for authentication
  • Express-validator
  • Security: Helmet, bcrypt, rate limiting

Frontend

  • React 18 + Vite
  • Tailwind CSS for styling
  • Fetch API for data handling

🚀 Getting Started

Prerequisites

  • Node.js (v14+)
  • MongoDB (local or Atlas)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/text-utils.git
    cd text-utils
  2. Configure environment variables

    Create a .env file in the backend directory:

    JWT_SECRET=your_super_secret_key_here
    PORT=5000
    MONGODB_URI=mongodb://localhost:27017/TextUtils
    
  3. Install dependencies

    # Backend setup
    cd backend
    npm install
    
    # Frontend setup
    cd ../frontend
    npm install
  4. Run the application

    # Start backend (from backend directory)
    npm run dev
    
    # Start frontend (from frontend directory)
    npm run dev
  5. Access the application

    Open your browser and navigate to http://localhost:3000

📡 API Documentation

Endpoint Method Description Authentication
/api/register POST Register new user Public
/api/login POST Login and get JWT Public
/api/texts GET Retrieve all user texts Protected
/api/texts POST Create new text Protected
/api/texts/:id PUT Update existing text Protected
/api/texts/:id DELETE Delete a text Protected

📁 Project Structure

text-utils/
├── backend/                # Node.js server
│   ├── middleware/         # Auth middleware
│   ├── models/             # MongoDB schemas
│   ├── routes/             # API endpoints
│   └── server.js           # Express app entry
│
└── frontend/               # React application
    ├── src/
    │   ├── api/            # API service functions
    │   ├── components/     # React components
    │   └── App.jsx         # Main component
    ├── index.html          # HTML entry
    └── tailwind.config.js  # Tailwind configuration

🔒 Security Features

  • Password hashing with bcrypt
  • JWT authentication for protected routes
  • API rate limiting to prevent brute force attacks
  • HTTP headers hardened with Helmet
  • Input validation with Express-validator

💡 Usage Examples

Text Transformation

  1. Enter text in the main text area
  2. Use the buttons to transform text (uppercase, lowercase, etc.)
  3. View character and word count metrics in real-time

Saving and Managing Texts

  1. Login to your account or register a new one
  2. Transform your text as needed
  3. Click "Save" to store it to your account
  4. Access your saved texts from the dashboard
  5. Edit or delete saved texts as needed

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

🙏 Acknowledgements

About

A modern full-stack web app for transforming and saving text, featuring user authentication, secure storage, and a beautiful UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published