Skip to content

Latest commit

 

History

History
103 lines (76 loc) · 2.75 KB

quickstart.mdx

File metadata and controls

103 lines (76 loc) · 2.75 KB
title Quickstart
description Welcome to the Quickstart page! Here you will learn how to set up your local development environment and how to begin making edits to the code, along with best practices and some tips.

Localhost Setup

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Git

Installation

  1. Navigate to the GitHub Repository

  2. Clone the Repository

    > git clone https://github.com/d2dcure/d2d-cure.git
    > cd d2d-cure
  3. Install Dependencies

    > npm install
  4. Set up enviornment variables

    • Create a .env and .env.local file in the root directory with the following variables:
    DATABASE_URL_USERS="key_here"
    DATABASE_URL_PROTEINS="key_here"
    DATABASE_URL_ENZYMES="key_here"
    DATABASE_URL_PUBLICATIONS="key_here"
    FIREBASE_PRIVATE_KEY="key_here"
    AWS_ACCESS_KEY_ID=key_here
    AWS_SECRET_ACCESS_KEY=key_here
    Note: the secret keys are not publicly available: please contact support to obtain the actual values for these keys. For simple frontend changes, secrets keys are not necessary.
  5. Start the development server

    > npm run dev

Troubleshooting

Common Issues

  1. Database Connection Errors
    • Check DATABASE_URL in .env
    • Verify database server status
  2. Authentication Issues
    • Verify Firebase configuration
    • Check user permissions
  3. File Upload Problems
    • Confirm AWS credentials
    • Check file size limits

Viewing the Database Structure

There are several tools that exist to be able to view the MariaDB database structure (database names, tables, columns, values, etc). One of the most popular and user-friendly options is MySQL Workbench.

Setup

  1. Download MySQL Workbench from the official website (https://dev.mysql.com/downloads/workbench/)
  2. Install and launch the application

Connecting to the Database

  1. Click the "+" icon to create a new connection

  2. Configure connection settings:

    • Connection Name: D2D-Cure-DB
    • Hostname: [Your database host]
    • Port: 3306
    • Username: [Your database username]
    • Password: [Your database password]
  3. Test the connection and click "OK" to save

Note: please contact support to recieve the actual values for the connection settings

Using MySQL Workbench

  • Browse Structure: Expand the connection in the sidebar to view databases, tables, and columns
  • Execute Queries: Open a new query tab to run SQL commands
  • View Data: Right-click on tables and select "Select Rows" to see data

Next Steps

  • Explore advanced features
  • Create your first pull request
  • Join the community