Skip to content

JomsCode21/Bare-Minimum-Planner-Front-End

Repository files navigation

🎨 Bare Minimum Planner - Frontend

A Modern, Minimalist Task Management Interface

React TypeScript Vite Tailwind CSS

Features β€’ Tech Stack β€’ Getting Started β€’ Project Structure β€’ Scripts


✨ Features

πŸ” Authentication

  • βœ… User registration with validation
  • βœ… Secure login with JWT tokens
  • βœ… Password reset functionality
  • βœ… Protected route guards
  • βœ… Persistent authentication state

πŸ“± Responsive Design

  • βœ… Mobile-first approach
  • βœ… Tablet & desktop optimized
  • βœ… Smooth transitions
  • βœ… Modern UI components

πŸ“ Task Management

  • βœ… Create, read, update, delete tasks
  • βœ… Real-time task updates
  • βœ… Task completion toggle
  • βœ… Task filtering & organization
  • βœ… Intuitive dashboard interface

🎨 User Experience

  • βœ… Toast notifications
  • βœ… Loading states & spinners
  • βœ… Form validation feedback
  • βœ… Framer Motion animations
  • βœ… Clean, minimalist design

πŸ› οΈ Tech Stack

Core Framework

React

Building UI with the latest React features including hooks, context, and modern patterns.

Build Tool

Vite

Lightning-fast HMR and optimized production builds.

Styling

Tailwind

Utility-first CSS framework for rapid UI development.

πŸ“¦ Key Dependencies

Package Version Purpose
react 19.2.0 UI library
react-router-dom 7.13.0 Client-side routing
zustand 5.0.11 State management
axios 1.13.5 HTTP client
framer-motion 12.34.0 Animation library
react-hot-toast 2.6.0 Toast notifications
react-icons 5.5.0 Icon library
@fontsource/poppins 5.2.7 Custom font

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Node.js >= 18.x
npm >= 9.x (or yarn)

Installation

  1. Clone the repository
git clone https://github.com/JomsCode21/Bare-Minimum-Planner-Front-End.git
cd Bare-Minimum-Planner-Front-End
  1. Install dependencies
npm install
  1. Configure environment (if needed)

The frontend is pre-configured to proxy API requests to http://localhost:5000.

To change the backend URL, update vite.config.ts:

server: {
  proxy: {
    "/api": {
      target: "http://your-backend-url:port",
      changeOrigin: true,
    },
  },
}
  1. Start the development server
npm run dev

The application will be available at http://localhost:5173 πŸš€


πŸ“ Project Structure

frontend/
β”œβ”€β”€ public/                    # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/                  # API service layer
β”‚   β”‚   β”œβ”€β”€ auth.ts           # Authentication API calls
β”‚   β”‚   └── tasks.ts          # Task management API calls
β”‚   β”‚
β”‚   β”œβ”€β”€ assets/               # Images, icons, etc.
β”‚   β”‚
β”‚   β”œβ”€β”€ axios/                # Axios configuration
β”‚   β”‚   └── axios-instance.ts # Axios instance with interceptors
β”‚   β”‚
β”‚   β”œβ”€β”€ components/           # React components
β”‚   β”‚   β”œβ”€β”€ dashboard/        # Dashboard-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ AddTaskModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ButtonNav.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardCard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DeleteTaskModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DeletesuccessModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EditTaskModal.tsx
β”‚   β”‚   β”‚   └── ViewTaskModal.tsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ forgotpassword/   # Password reset components
β”‚   β”‚   β”‚   β”œβ”€β”€ ForgotPasswordCard.tsx
β”‚   β”‚   β”‚   └── ResetPasswordCard.tsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ login/            # Login components
β”‚   β”‚   β”‚   └── Logincard.tsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ register/         # Registration components
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterCard.tsx
β”‚   β”‚   β”‚   └── TermsModal.tsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ routes/           # Route protection
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoutes.tsx
β”‚   β”‚   β”‚   └── PublicRoutes.tsx
β”‚   β”‚   β”‚
β”‚   β”‚   └── ui/               # Reusable UI components
β”‚   β”‚       β”œβ”€β”€ Buttons.tsx
β”‚   β”‚       β”œβ”€β”€ InputField.tsx
β”‚   β”‚       └── UniversalButton.tsx
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/                # Page components (routes)
β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   └── Dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ forgotpassword/
β”‚   β”‚   β”‚   β”œβ”€β”€ ForgotPasswordPage.tsx
β”‚   β”‚   β”‚   └── ResetPasswordPage.tsx
β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”‚   └── LoginPage.tsx
β”‚   β”‚   β”œβ”€β”€ register/
β”‚   β”‚   β”‚   └── RegisterPage.tsx
β”‚   β”‚   └── LandingPage.tsx
β”‚   β”‚
β”‚   β”œβ”€β”€ store/                # Zustand state management
β”‚   β”‚   β”œβ”€β”€ authStore.ts      # Authentication state
β”‚   β”‚   └── taskStore.ts      # Task management state
β”‚   β”‚
β”‚   β”œβ”€β”€ types/                # TypeScript type definitions
β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   β”œβ”€β”€ dashboard.ts
β”‚   β”‚   β”œβ”€β”€ forgotpassword.ts
β”‚   β”‚   β”œβ”€β”€ task.ts
β”‚   β”‚   β”œβ”€β”€ terms&condition.ts
β”‚   β”‚   └── ui.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/                # Utility functions
β”‚   β”‚
β”‚   β”œβ”€β”€ App.tsx               # Main application component
β”‚   β”œβ”€β”€ main.tsx              # Application entry point
β”‚   └── index.css             # Global styles
β”‚
β”œβ”€β”€ .eslintrc.js              # ESLint configuration
β”œβ”€β”€ tsconfig.json             # TypeScript configuration
β”œβ”€β”€ tsconfig.app.json         # App-specific TS config
β”œβ”€β”€ tsconfig.node.json        # Node-specific TS config
β”œβ”€β”€ vite.config.ts            # Vite configuration
β”œβ”€β”€ package.json              # Dependencies and scripts
└── README.md                 # This file

🎯 Key Features Explained

πŸ” Authentication Flow

graph LR
    A[Landing Page] -->|New User| B[Register]
    A -->|Existing User| C[Login]
    B -->|Success| D[Dashboard]
    C -->|Success| D
    C -->|Forgot Password| E[Reset Password]
    E -->|Email Link| F[New Password]
    F -->|Success| C
    D -->|Protected| G[Task Management]
Loading

πŸ—‚οΈ State Management (Zustand)

The application uses Zustand for simple and efficient state management:

Auth Store (store/authStore.ts)

  • Manages user authentication state
  • Handles login/logout
  • Persists authentication across page refreshes
  • Provides auth status to components

Task Store (store/taskStore.ts)

  • Manages task list
  • CRUD operations for tasks
  • Loading states
  • Error handling

πŸ›£οΈ Routing Structure

Route Component Protection Description
/ LandingPage ❌ Public Welcome page
/login LoginPage πŸ”“ Public only User login
/register RegisterPage πŸ”“ Public only User registration
/forgotpassword ForgotPasswordPage πŸ”“ Public only Request password reset
/resetpassword ResetPasswordPage πŸ”“ Public only Reset password with token
/dashboard Dashboard πŸ”’ Protected Main task dashboard

Route Guards:

  • PublicRoutes - Redirects authenticated users to dashboard
  • ProtectedRoutes - Redirects unauthenticated users to login

πŸ“ Available Scripts

Development

Command Description
npm run dev πŸ”₯ Start development server with hot reload at http://localhost:5173
npm run build πŸ—οΈ Build for production (TypeScript check + Vite build)
npm run preview πŸ‘€ Preview production build locally
npm run lint ✨ Run ESLint to check code quality

Script Details

# Start development server
npm run dev
# Features:
# - Hot Module Replacement (HMR)
# - Fast refresh
# - Source maps
# - Development optimizations

# Build for production
npm run build
# Steps:
# 1. TypeScript compilation check
# 2. Vite production build
# 3. Asset optimization
# 4. Code minification

# Preview production build
npm run preview
# Test production build locally before deployment

# Lint code
npm run lint
# Checks for:
# - Code quality issues
# - Unused variables
# - React best practices
# - TypeScript errors

🎨 Styling Approach

Tailwind CSS + Custom Configuration

The project uses Tailwind CSS v4 with the Vite plugin for optimal performance.

Key Features:

  • 🎯 Utility-first approach
  • πŸ“± Responsive design utilities
  • 🎨 Custom color palette
  • πŸ”€ Poppins font family
  • ⚑ JIT (Just-In-Time) compilation

Component Styling Pattern

// Example: Button component with Tailwind
<button
  className="px-4 py-2 bg-blue-500 hover:bg-blue-600 
                   text-white rounded-lg transition-colors 
                   duration-200 ease-in-out"
>
  Click Me
</button>

πŸ”Œ API Integration

Axios Configuration

The application uses a configured Axios instance with:

  • Base URL: Automatically proxied through Vite
  • Credentials: Included for cookie-based auth
  • Interceptors: Handle auth tokens and errors
  • Type Safety: Full TypeScript support

API Services

Authentication (api/auth.ts)

-login(email, password) -
  register(userData) -
  logout() -
  checkAuth() -
  forgotPassword(email) -
  resetPassword(token, newPassword);

Tasks (api/tasks.ts)

-fetchTasks() -
  addTask(title, description) -
  updateTask(id, updates) -
  deleteTask(id) -
  toggleTaskCompletion(id);

🎭 Animation & Transitions

Framer Motion Integration

Smooth, performant animations using Framer Motion:

  • Page transitions
  • Modal animations
  • List item animations
  • Hover effects
  • Loading states

Toast Notifications

React Hot Toast provides:

  • Success messages
  • Error alerts
  • Loading indicators
  • Custom styling
  • Auto-dismiss

πŸ§ͺ Code Quality

TypeScript Configuration

The project uses strict TypeScript settings for maximum type safety:

{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true
  }
}

ESLint Setup

Configured with:

  • React-specific rules
  • React Hooks rules
  • TypeScript ESLint
  • React Refresh plugin

πŸš€ Deployment

Build for Production

# Create production build
npm run build

# Output will be in: dist/

Deployment Options

Vercel

Deploy with Vercel

Netlify

Deploy to Netlify

Environment Variables

If deploying, ensure your backend URL is properly configured:

# .env (for non-Vite deployments)
VITE_API_URL=https://your-backend-api.com

πŸ› Troubleshooting

Development server won't start
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install

# Check if port 5173 is available
netstat -ano | findstr :5173
API requests failing
  1. Ensure backend is running on http://localhost:5000
  2. Check proxy configuration in vite.config.ts
  3. Verify CORS settings in backend
  4. Check browser console for errors
TypeScript errors
# Run type checking
npm run build

# Check specific file
npx tsc --noEmit
Styling not working
  1. Ensure Tailwind CSS is properly configured
  2. Check if index.css is imported in main.tsx
  3. Clear browser cache
  4. Restart dev server

πŸ“š Learning Resources

Documentation


🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch
    git checkout -b feature/amazing-feature
  3. ✍️ Commit your changes
    git commit -m 'Add some amazing feature'
  4. πŸ“€ Push to the branch
    git push origin feature/amazing-feature
  5. πŸ”ƒ Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Write meaningful commit messages
  • Add comments for complex logic
  • Update documentation as needed
  • Test thoroughly before submitting

πŸ“„ License

This project is licensed under the ISC License.


πŸ‘₯ Maintainers

JomsCode21
JomsCode21

πŸ’» 🎨 πŸ“–

πŸ™ Acknowledgments

  • πŸ’™ React Team - For the incredible framework
  • ⚑ Vite Team - For the blazing-fast tooling
  • 🎨 Tailwind Labs - For the amazing CSS framework
  • 🐻 Zustand Community - For simple state management
  • 🎭 Framer - For beautiful animations

πŸ”— Related Links


⭐ Star this repo if you find it helpful!

Made with ❀️ and β˜• by the Bare Minimum Planner Team

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages