Skip to content

Watermelon is a platform that seamlessly combines ADPList’s mentorship experience with Meetup’s community networking, creating a space for meaningful learning and connection.

Notifications You must be signed in to change notification settings

Curis-lab/Watermelon

Repository files navigation

📁 API Hooks Architecture (hooks/api)

This directory implements a structured approach to managing API-related React hooks, ensuring clean separation of concerns and maintainable data operations.

📂 Directory Structure

actions/ - Data Mutation Hooks

Handles all data modification operations:

  • Purpose: Writing, updating, or deleting data
  • HTTP Methods: POST, PUT, PATCH, DELETE
  • Naming Convention: useAction[Operation], e.g.:
    • useCreateUser
    • useUpdateProfile
    • useDeletePost

getters/ - Data Fetching Hooks

Manages all data retrieval operations:

  • Purpose: Reading or fetching data
  • HTTP Method: GET
  • Naming Convention: useGet[Resource], e.g.:
    • useGetUserProfile
    • useGetProjectList
    • useGetDashboardStats

🎯 Benefits

  • Clear Separation: Distinct folders for read vs. write operations
  • Predictable Naming: Consistent naming patterns for easy discovery
  • Maintainable Code: Isolated concerns make updates and testing easier
  • Team Efficiency: Clear structure helps new developers navigate the codebase

🔄 Best Practices

  • Keep hooks focused on single responsibilities
  • Implement proper error handling
  • Use TypeScript for better type safety
  • Add JSDoc comments for complex hooks

interfaces --> hooks use interface as output for hooks

🧠 Project Mindmap

📋 Overview

Access our project's visual architecture and planning resources through our interactive mindmap.

🔗 Quick Access

🔐 Development Credentials

Test User Account

⚠️ Note: These credentials are for development purposes only. Never commit real production credentials to source control.

About

Watermelon is a platform that seamlessly combines ADPList’s mentorship experience with Meetup’s community networking, creating a space for meaningful learning and connection.

Topics

Resources

Stars

Watchers

Forks

Languages