Skip to content

ztacole/recyclens-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Recyclens - AI-Powered Waste Classification System

An intelligent web application for automated waste type classification and environmental education

Recyclens is a modern, user-friendly platform designed to help users identify and properly manage different types of waste through artificial intelligence. The application leverages computer vision to classify waste into three categories: organic, inorganic, and hazardous (B3) waste, promoting environmental responsibility and proper waste management practices.

Recyclens Vite Tailwind CSS Status


🌟 Features

  • AI Waste Scanner: Upload images to automatically classify waste types using machine learning
  • Waste Education: Learn about different waste categories:
    • Organic Waste (Sampah Organik)
    • Inorganic Waste (Sampah Anorganik)
    • Hazardous Waste (Sampah B3)
  • Blog Section: Stay updated with articles about environmental sustainability and waste management best practices
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Fast Navigation: Smooth page transitions with React Router
  • Modern UI: Built with Tailwind CSS and complemented by icon libraries

πŸ› οΈ Tech Stack


πŸ“‹ Prerequisites

  • Node.js v14 or higher
  • npm or yarn package manager
  • Git (optional, for cloning the repository)

πŸš€ Installation

  1. Clone the repository

    git clone <repository-url>
    cd recyclens-fe
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Environment Setup (if needed for API configuration)

    • The application is configured to connect to the ML API at: https://web-production-c8bf2.up.railway.app/predict
    • Update API endpoints in api/predict.js if necessary

πŸ’» Development

Start Development Server

npm run dev

The application will be available at http://localhost:5173 with hot module replacement (HMR) enabled.

Build for Production

npm run build

Creates an optimized production build in the dist directory.

Preview Production Build

npm run preview

Serves the production build locally for testing.

Lint Code

npm run lint

Runs ESLint to check for code quality issues.


πŸ“ Project Structure

recyclens-fe/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ blogs.js              # Blog API integration
β”‚   └── predict.js            # ML waste prediction API handler
β”œβ”€β”€ public/                   # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   └── layout/
β”‚   β”‚       β”œβ”€β”€ navbar.jsx    # Navigation component
β”‚   β”‚       └── footer.jsx    # Footer component
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ home.jsx          # Home page with hero section
β”‚   β”‚   β”œβ”€β”€ about.jsx         # About page
β”‚   β”‚   β”œβ”€β”€ scan.jsx          # Waste scanner/prediction page
β”‚   β”‚   β”œβ”€β”€ blog.jsx          # Blog listing page
β”‚   β”‚   β”œβ”€β”€ contact.jsx       # Contact page
β”‚   β”‚   └── education/        # Educational pages
β”‚   β”‚       β”œβ”€β”€ organik.jsx        # Organic waste info
β”‚   β”‚       β”œβ”€β”€ anorganik.jsx      # Inorganic waste info
β”‚   β”‚       └── berbahaya.jsx      # Hazardous waste info
β”‚   β”œβ”€β”€ assets/               # Images and media files
β”‚   β”‚   └── image/
β”‚   β”‚       β”œβ”€β”€ Article/      # Blog article images
β”‚   β”‚       β”œβ”€β”€ background/   # Background images
β”‚   β”‚       └── team/         # Team images
β”‚   β”œβ”€β”€ App.jsx               # Main app component with routing
β”‚   β”œβ”€β”€ App.css               # App styles
β”‚   β”œβ”€β”€ main.jsx              # React DOM entry point
β”‚   └── index.css             # Global styles
β”œβ”€β”€ eslint.config.js          # ESLint configuration
β”œβ”€β”€ vite.config.js            # Vite configuration
β”œβ”€β”€ tailwind.config.js        # Tailwind CSS configuration
β”œβ”€β”€ postcss.config.js         # PostCSS configuration
β”œβ”€β”€ package.json              # Project dependencies
└── index.html                # HTML entry point

πŸ”— Available Routes

Route Page Description
/ Home Landing page with hero section
/about About About Recyclens and its mission
/scan Scan Waste classification scanner
/organik Organic Waste Educational content on organic waste
/anorganik Inorganic Waste Educational content on inorganic waste
/b3 Hazardous Waste Educational content on hazardous waste
/blog Blog Environmental sustainability articles
/contact Contact Contact and support page

🧠 How It Works

  1. Upload Image: Users visit the /scan page and upload a waste item image
  2. AI Processing: The image is sent to the ML API for classification
  3. Result: The system returns the waste category and handling recommendations
  4. Education: Users can learn more through educational pages tailored to each waste type

🌐 Deployment

Vercel

This project is configured for Vercel deployment:

npm run build
# Deploy using Vercel CLI
vercel deploy

Check vercel.json for deployment configuration.

Environment Variables

Ensure the API endpoint is correctly set in your deployment environment:

  • ML API Base: https://web-production-c8bf2.up.railway.app

πŸ“ Scripts Reference

Script Command Description
Dev npm run dev Start development server with HMR
Build npm run build Build for production
Lint npm run lint Check code quality
Preview npm run preview Preview production build

πŸ› Troubleshooting

Port Already in Use

If port 5173 is in use, Vite will automatically try the next available port. Check the terminal output.

API Connection Issues

  • Verify the ML API endpoint is accessible
  • Check network connectivity
  • Review browser console for CORS issues

Build Errors

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
npm run build

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Create a feature branch (git checkout -b feature/YourFeature)
  2. Make your changes
  3. Run linting (npm run lint)
  4. Commit your changes (git commit -m 'Add YourFeature')
  5. Push to the branch (git push origin feature/YourFeature)
  6. Open a Pull Request

πŸ“„ License

This project is part of the Recyclens initiative. All rights reserved.


πŸ“§ Contact & Support

For questions, issues, or support:


πŸ™ Acknowledgments

  • React and Vite communities for excellent tools
  • Tailwind CSS for beautiful styling framework
  • All contributors and team members dedicated to environmental sustainability

Happy recycling with Recyclens! πŸŒβ™»οΈ

About

AI Powered Waste Classification - Coding Camp 2025 by DBS Foundation Capstone Project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages