Backend Stack
Frontend Stack
rButler project is a comprehensive online platform that allows users to create and manage their digital households effortlessly. This platform is designed to streamline household organization by providing a centralized space for users to collaborate on various lists, including shopping and to-do lists. The goal is to simplify day-to-day tasks and enhance communication within households.
- Project Overview
- Project Deployment
- Warnings
- Key Features
- How It Works
- Project Structure
- Running the Application
- Running tests
- API Endpoints
- License
rButler project aims to enhance household organization, fostering better communication and cooperation among its users. Whether it's planning a shopping trip or coordinating daily tasks, this platform simplifies the management of household responsibilities in the digital age.
rButler is deployed on a free hosting service render, providing you with the opportunity to experience its features firsthand. To access the live version, simply visit rButler Live.
- The deployed version may be subject to periodic updates and maintenance.
- For the best user experience, we recommend using the latest version of Mozilla Firefox or Chrome, with a desktop resolution of 1920x1080.
Feel free to explore and test the various functionalities of rButler in this live environment. If you encounter any issues or have feedback, please let us know through our GitHub Issues page.
Enjoy using rButler for seamless household organization!
- Best to be used on desktop with resolution 1920x1080
- Developed on Mozilla Firefox (latest version)
- Tested on Chrome (latest version)
- Digital Households: Users can effortlessly create and manage digital households, inviting family members or housemates to collaborate in a centralized space.
- List Management: The platform facilitates the creation and maintenance of various lists, such as shopping and to-do lists, tailored to each household's unique needs.
- Real-time Collaboration: Enjoy seamless real-time collaboration among household members, allowing for contributions, edits, and completion status updates on shared lists.
- User Authentication: Secure user authentication ensures a personalized experience for each member within their digital household.
- Intuitive User Interface: The platform boasts a user-friendly interface, providing easy navigation and efficient list management.
- Account Creation: Users sign up to create personalized accounts, establishing a digital space for their household.
- Household Creation: Once registered, users create digital households and invite family members or housemates to join using unique household codes.
- List Creation and Management: Within each household, users create different lists (e.g., shopping or to-do lists) and collaboratively manage them.
- Real-time Updates: All changes to lists, including additions and completions, are updated in real-time, ensuring every household member stays informed.
- Personalization: Users can customize their digital households and lists, tailoring the experience to their specific needs.
The project follows a structured organization to enhance maintainability and ease of navigation. Here's a brief overview of the main directories and their purposes:
-
/client
: Contains the frontend application built with React./public
: Static assets and HTML template./src
: React components, styles, and application logic.
-
/server/src
: Houses the backend application built with Node.js and Express./config
: Configuration files for the server./controllers
: Controllers handling the business logic./models
: Database models (if applicable)./routes
: Express routes for handling API requests./utils
: Utility functions and helper modules.
Feel free to explore each directory for more detailed information on their contents. This structure is designed to enhance code organization, making it easier for developers to locate and work on specific aspects of the application.
git clone https://github.com/didoslavov/rButler.git
Open a new terminal window/tab in the root directory of your project.
Navigate to server
directory:
cd server
To set up the server, run the following command:
./server_setup.sh
This script will:
1. Set up environment variables for the server. Navigate to server/.env and fill your sensitive information.
2. Install server dependencies.
3. Start the server in development mode.
Open a new terminal window/tab in the root directory of your project.
Navigate to client directory:
cd client
To set up the client
, run the following command:
./client_setup.sh
This script will:
1. Set up environment variables for the client. Navigate to client/.env and fill your sensitive information.
2. Install client dependencies.
3. Start the client in development mode.
Open a new terminal window/tab in the root directory of your project.
Navigate to server
directory:
cd server
To set up the server, run the following command:
.\windows_server_setup.bat
This script will:
1. Set up environment variables for the server. Navigate to server/.env and fill your sensitive information.
2. Install server dependencies.
3. Start the server in development mode.
Open a new terminal window/tab in the root directory of your project.
Navigate to client
directory:
cd client
To set up the client, run the following command:
.\windows_client_setup.bat
This script will:
1. Set up environment variables for the client. Navigate to client/.env and fill your sensitive information.
2. Install client dependencies.
3. Start the client in development mode.
-
Open a new Command Prompt or PowerShell window in the root directory of your project.
-
Navigate to the
server
directory:cd server
-
Create a new
.env
file in theserver
directory with the following content:PORT=3000 DB_URI=mongodb+srv://<USER NAME>:<DB PASSWORD>@<DB NAME>.dqs4ylm.mongodb.net/<PROJECT NAME> JWT_SECRET=<JWT SECRET>
-
Install server dependencies:
npm install
-
Start the server in development mode:
npm run dev
-
Open a new Command Prompt or PowerShell window in the root directory of your project.
-
Navigate to the
client
directory:cd client
-
Create a new
.env
file in theclient
directory with the following content:VITE_BASE_URL=http://localhost:3000 VITE_SUPABASE_URL=<SUPABASE URL> VITE_SUPABASE_BUCKET=/storage/v1/object/public/<BUCKET NAME>/ VITE_SUPABASE_API_KEY=<SUPABASE API KEY> VITE_OPENWEATHER_API_KEY=<OPENWEATHER API KEY> VITE_OPENWEATHER_BASE_URL=https://api.openweathermap.org/data/2.5
-
Install client dependencies:
npm install
-
Start the client in development mode:
npm run dev
-
Client setup complete! Open the following link in your web browser: http://localhost:5173
The frontend tests in rButler are designed to ensure the reliability and functionality of the user interface. We use Vitest, a lightweight and flexible testing library, in combination with @vitest/ui for a seamless testing experience.
- @testing-library/react: Unit tests are implemented using @testing-library/react to test individual React components in isolation. This ensures that each component behaves as expected and can be easily maintained.
- @testing-library/jest-dom: Jest-DOM is utilized for extending Jest's functionality, providing a set of custom Jest matchers for asserting on the state of the DOM elements. This enhances the precision of our component tests.
- Vitest: Integration tests are conducted using Vitest to validate the interactions and collaborations between various components. Vitest provides a clear and concise syntax for writing integration tests, making it easier to understand and maintain the test suite.
- @vitest/ui: UI tests are executed using @vitest/ui to create a visual representation of the test results in a browser tab. This allows for a more comprehensive analysis of the frontend behavior, facilitating quick identification of any issues or regressions.
- redux-mock-store: For testing Redux state management, we utilize redux-mock-store. This library enables us to create a mock Redux store, allowing us to simulate actions and state changes, ensuring that the application state is correctly managed.
These testing tools collectively contribute to a robust testing suite that covers different aspects of the frontend, including individual component behavior, component interactions, and the overall user interface. Running both unit and UI tests ensures a comprehensive evaluation of the frontend functionality, providing confidence in the stability of the rButler application.
npm run test
To run the frontend tests in a browser tab with a detailed report, you can use the following command:
npm run test:ui
-
POST /users/register
- Description: Register a new user.
- Request:
{ "username": "string", "email": "string", "password": "string" }
- Response:
{ "User Data": "userData" }
-
POST /users/login
- Description: Authenticate and log in a user.
- Request:
{ "username": "string", "password": "string" }
- Response:
{ "User Data": "userData" }
-
POST /households
- Description: Create a new household.
- Request:
{ "master": "string", "name": "string", "presentation": "string" }
- Response:
{ "message": "Household created successfully", "householdId": "unique_id_here" }
-
GET /households/:householdId
- Description: Get details of a specific household.
- Response:
{ "householdId": "unique_id_here", "master": "unique_owner_id", "name": "string", "presentation": "string", "users": ["username1", "username2", "..."], "lists": ["shopping", "todo", "..."] }
-
PATCH /households/:householdId/update
- Description: Update a household.
- Request:
{ "householdId": "unique_household_id", "name": "string", "presentation": "string" }
- Response:
{ "success": "Household updated successfully" }
-
DELETE /api/households/:householdId
-
Description: Delete a household.
-
Response:
{ "message": "Household deleted successfully" }
This project is licensed under the MIT License - see the LICENSE file for details.
-