Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist
/node_modules
/build
.env

# Logs
logs
Expand Down
1 change: 0 additions & 1 deletion apps/api/docs/database-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ This schema can be visualized in the following image:
| Attribute | Data Type | Not Null | Default | Description |
| --- | --- | --- | --- | --- |
| job_id | int(11) | True | | Primary key, unique identifier for the uploaded record |
| file_id | varchar(255) | True | | Stores the ID value for related file_id |
| job_status | enum | True | | Stores the job status for related job_id |
| input_file | varchar(255) | | | References the file stored in files table |
| output_file | varchar(255) | | | References the processed file stored in files table |
Expand Down
85 changes: 85 additions & 0 deletions apps/api/docs/development-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Development Setup

This document outlines the steps required to set up your Transcript Summarization for development. By following these steps, you'll be able to run your application locally with the necessary environment variables and database configuration.

## Prerequisites

Before setting up Transcript Summarization for development, ensure you have the following prerequisites with the specified versions:

- **NVM (Node Version Manager):** Use NVM to manage Node.js versions.
- **Node.js** Node.js v20.x or higher. Can be installed via `nvm` using `nvm install 20` and used with `nvm use 20`.
- **Git:** Git v2.x or higher.
- **MariaDB:** MariaDB v10.x or higher.
- **Redis:** Redis v6.x or higher

These prerequisites are essential for deploying and running Transcript Summarization in an environment.

Please make sure to have these versions installed on your development server before proceeding with the setup.

Make sure Redis and MariaDB server are up and running.

```bash
sudo systemctl status redis
sudo systemctl status mariadb
```

## Getting Started

1. Clone the repository to your local machine:

```sh
git clone https://github.com/OsmosysSoftware/osm-transcript-summarizer
cd osm-transcript-summarizer/apps/api
```

2. Install project dependencies:

```sh
npm install
```

3. Create a `.env` file in the project root and add the required environment variables:

```env
# Server
SERVER_PORT=3000
# Node env
NODE_ENV=development
# Database configuration
DB_TYPE=mariadb
DB_HOST=localhost # use value as transcriptsummary-mariadb in docker
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=your-password
DB_NAME=your-database
MARIADB_DOCKER_PORT=3307 # (required only if using docker)
# Redis configuration
REDIS_HOST=127.0.0.1 # use value as transcriptsummary-redis in docker
REDIS_PORT=6379
REDIS_DOCKER_PORT=6397 # (required only if using docker)
```

Alternatively, use the `.env.example` file instead.

Make sure to replace the above example values with appropriate values as per your setup and configuration. Server Port is `3000`, you can update it if you want to use a different port of your choice.

4. Set up the database:

Ensure your database server (e.g., MariaDB) is running.

Run database migrations to create tables:

```sh
npm run typeorm:run-migrations
```

5. Start the development server:

```sh
npm run start:dev
```

Transcript Summarization will now be running locally at `http://localhost:3000`.
10 changes: 10 additions & 0 deletions apps/api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
Loading