SMEDRECSMEDREC
Home
Get Started
AI Agents
Development Resources
Home
Get Started
AI Agents
Development Resources
  • Introduction

    • Get Started
  • AI Agents

    • FHIR Test Agent
    • Assistant Agent
    • Patient Report Agent
    • Scheduling Agent
  • Development

    • Development Resources
    • MCP FHIR Server Overview
    • Authentication and Authorization Flow (MCP Server)
    • FHIR Client (@repo/fhir)
    • MCP FHIR Tools
    • Security Considerations
    • Deployment and Configuration
  • Applications

    • API Application (apps/api)
    • Audit Worker (apps/audit)
  • Packages

    • Audit Package (@repo/audit)
    • @repo/auditdb
    • Mailer Package (@repo/mailer)
    • Cerbos Client (@repo/cerbos)
  • Databases

    • Transparent Field Encryption in PostgreSQL

Get Started

This guide will walk you through setting up your development environment for SMEDREC and running the project locally.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (LTS version recommended)
  • pnpm
  • Just (a command runner)

Installation

  1. Clone the repository:

    git clone https://github.com/smedrec/smart-medical-records.git
    cd smart-medical-records
    

    Note: If you are a contributor, fork the repository first and clone your fork.

  2. Install dependencies: The project uses pnpm for package management and Just for running scripts. Install all dependencies using the following command:

    just install
    

    This command will install dependencies for all apps and packages in the monorepo.

Running the Development Servers

To start the development servers for all applications (e.g., API, web frontend), run:

just dev

This will typically start the API server and the web application, allowing you to interact with SMEDREC in your local environment. Check your terminal output for the specific ports they are running on (e.g., http://localhost:3000 for the web app, http://localhost:8801 for the API).

Building for Production

To build all applications for production, use:

just build

Running Tests

To run all tests across the project, use:

just test

You can also run tests for a specific application or package. For example, to test the API:

pnpm turbo -F @smedrec/api test

Deployment

To deploy the applications (see the docker compose file for more details), use:

docker compose build
docker compose up -d

Next Steps

  • Explore the Project Structure
  • Learn about our Development Workflow
Last Updated: 7/10/25, 7:27 PM
Contributors: José Cordeiro, google-labs-jules[bot]