taMEgotchi

taMEgotchi is a web application that allows users to manage their virtual pet's activities, nutrition, and sleep. The application uses Auth0 for authentication and Cohere for generating responses based on user data.

Project Structure

client/
    .gitignore
    package.json
    public/
        index.html
        manifest.json
        robots.txt
    README.md
    src/
        assets/
            buttons/
                button.psd
            emotions/
                happy/
                hungry/
                lazy/
                tired/
            option1/
        components/
            loginButton.jsx
            logoutButton.jsx
            profile.jsx
        index.css
        index.js
        pages/
            home/
            login/
            mepet/
            register/
    tailwind.config.js
server/
    __pycache__/
    .env
    .gitignore
    coherebot.py
    requirements.txt
    server.py
    sleep.py
    templates/
        home.html
    utils.py

Getting Started

Prerequisites

  • Node.js
  • npm
  • Python
  • MongoDB

Installation

  1. Clone the repository:
git clone https://github.com/your-repo/taMEgotchi.git
cd taMEgotchi
  1. Install client dependencies:
cd client
npm install
  1. Install server dependencies:
cd ../server
pip install -r requirements.txt

Configuration

  1. Create a .env file in the server directory with the following content:
AUTH0_CLIENT_ID=your_auth0_client_id
AUTH0_CLIENT_SECRET=your_auth0_client_secret
AUTH0_DOMAIN=your_auth0_domain
APP_SECRET_KEY=your_app_secret_key
MONGO_URL=your_mongo_url
COHERE_API_KEY=your_cohere_api_key

Running the Application

  1. Start the server:
cd server
python server.py
  1. Start the client:
cd ../client
npm start

The application will be available at http://localhost:3000.

Usage

  • Login: Users can log in using Auth0.
  • Register: New users can register their virtual pet.
  • Manage Pet: Users can manage their pet's activities, nutrition, and sleep.

File Descriptions

  • client/src/components: Contains React components for login, logout, and profile.
  • client/src/pages: Contains pages for home, login, mepet, and register.
  • server/server.py: Main server file handling routes and database operations.
  • server/coherebot.py: Handles Cohere API interactions.
  • server/utils.py: Utility functions for the server.
  • server/sleep.py: Handles sleep-related operations.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Built With

Share this project:

Updates