Greenie Web Application is an eco-friendly platform designed to promote sustainability through challenges, gamification, and community engagement.
- ReactJS + TailwindCSS
- Node.js v22.x
- GitHub Actions for CI
- Node.js v22.x
- npm (Node package manager)
-
Clone the repository
git clone https://github.com/dizzpy/Greenie-Web.git
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Build the project
npm run build
-
Start the production server
npm run start
- Fork the repository.
- Create a new branch:
git checkout -b feat/your-feature-branch
. - Make your changes.
- Commit your changes:
git commit -m "feat: Add feature description"
. - Push to your branch:
git push origin your-feature-branch
. - Create a pull request to merge your changes into the main branch.
We use GitHub Actions for continuous integration. The project is built on every pull request. Once merged, Vercel automatically deploys the updated project.
📂 src
┣ 📂 assets # Stores static assets (icons, images, etc.)
┃ ┣ 📂 icons # SVGs and icons
┃ ┗ 📂 images # Static images
┃
┣ 📂 components # Reusable global UI components
┃ ┣ 📂 Buttons # Button components (e.g., IconButton, PrimaryButton)
┃ ┣ 📂 Shared # Common components (e.g., Navbar, Footer, Modal)
┃ ┗ 📂 Forms # Form elements (e.g., InputField, Checkbox)
┃
┣ 📂 pages # All page components
┃ ┣ 📜 HomePage.jsx
┃ ┗ 📜 NotFound.jsx
┃
┣ 📂 [feature-name] # Feature-specific folder (e.g., shop, user)
┃ ┣ 📂 components # UI components specific to this feature
┃ ┣ 📂 pages # Pages related to this feature
┃ ┣ 📂 data # Static or mock data (e.g., product lists)
┃ ┣ 📂 services # API calls, Firebase, or business logic for this feature
┃ ┗ 📜 index.jsx # Entry file for the feature
┃
┣ 📂 services # API services and Firebase functions
┃ ┣ 📜 api.js # General API calls
┃ ┗ 📜 auth.js # Authentication services
┃
┣ 📂 utils # Utility functions/helpers
┃ ┗ 📜 formatDate.js # Example: date formatter
┃
┣ 📜 App.jsx # Main application component
┣ 📜 main.jsx # Entry point for rendering the app
┗ 📜 index.css # Global styles
- icons/ → SVG icons
- images/ → Static images
- Buttons/ → Buttons (PrimaryButton, IconButton)
- Shared/ → Common UI components (Navbar, Footer, Modal)
- Forms/ → Form inputs, text fields, dropdowns
- Global pages (e.g.,
HomePage.jsx
,NotFound.jsx
)
- components/ → UI components for that feature
- pages/ → Pages related to the feature
- data/ → Mock/static data files
- services/ → API calls and business logic
- index.jsx → Main entry file for the feature
- API handling and Firebase functions
- Helper functions (e.g., date formatting, number conversions)