- This project services the backend server and contains the functionality needed to connect to the backend server.
- Paged List of Khatmat.
- Lists all recitation audio files.
- Plays recitation audio files.
- Downloadable recitation audio files.
- Lists files from the library.
- Provides files categories.
- Provides search options.
- Downloads files.
- File's thumbnails.
Our API documentation is generated by Swagger and can be accessed here.
Note: You can call any GET endpoint without any restriction or authorization.
You can view our Database Diagram here.
Our code documentation can be accessed here.
We use TypeDoc for generating documentation from our TypeScript codebase. To generate the documentation, you need to run the following command:
npm run docs
This command will generate documentation in the ./docs directory. To view the generated documentation, open the index.html file located in the ./docs folder in your web browser.
To get the Kawtharuna Backend Server up and running in your development environment, follow these steps:
-
Database Configuration:
- Create a PostgreSQL database and user with the following credentials:
- Username:
kawtharuna_user
- Password:
DEV_PASSWORD_THANK_YOU
- Database Name:
kawtharuna
- Username:
- Initialize the database tables by executing the SQL statements found in
src/db/sql/kawtharuna-dev.sql
. Alternatively, you can setsynchronize: true
insrc/db/data-source-dev.ts
to let TypeORM create the tables automatically.
- Create a PostgreSQL database and user with the following credentials:
-
Firebase Setup:
- Create a
.keys
folder in the project root. - Place your Firebase Admin SDK file within this folder as
.keys/firebase-adminsdk-dev.json
. - Ensure the filename aligns with your
NODE_ENV
setting, following the pattern:./.keys/firebase-adminsdk-${process.env.NODE_ENV}.json
.
- Create a
-
Environment Variables:
- Create a
.env.dev
file in thesrc/environment/
directory. - The file should be named
.env.{process.env.NODE_ENV}
. - Include the following variables:
GCLOUD_PROJECT
(required) - The name of your Firebase project's storage.PORT
(optional, default: 8080) - The port number for the server.NODE_ENV
(optional)
Note: The
GCLOUD_PROJECT
variable is essential for Firebase storage integration. - Create a
-
Project Dependencies:
- Run
npm install
at the root of the project to install all necessary packages.
- Run
-
Starting the Server:
- Execute
npm run dev
to start the server. - By default, the server runs on
localhost:8080
or on a port specified by your.env.dev
configuration.
- Execute
Now, your Kawtharuna Backend Server should be operational in your development environment!