Skip to content

Epistudium/api

Repository files navigation

Epistudium API

Status Docker License

Backend API for the Epistudium project, managed with Docker to ensure easy deployment across different environments. This README explains how to set up and run the project. For the full API reference (GraphQL schema, queries/mutations, REST helpers, auth and examples), see: API_REFERENCE.md.


🚀 Prerequisites

Before running the project, make sure you have the following installed on your computer:


📥 Cloning the Repository

git clone https://github.com/Epistudium/api
cd api

👳️ Running the Project with Docker

1. Setup dotenvs

in root, create .env.development.local and .env.test.local

2. Build the images

docker compose build

3. Start the containers

docker compose up


To run in the background, use:

docker compose up -d


🛧️ Useful Commands

  • Stop the containers:
docker compose down
  • View container logs:
docker compose logs -f
  • Access the container shell:
docker compose exec api bash
  • Run unit tests:
docker compose run -e DOTENV_CONFIG_PATH=.env.test.local app npm run test

📚 Project Structure

api/
├─ prisma/            # Prisma code
├─ src/               # API source code
├─ test/              # Tests
├─ docker-compose.yml # Container configuration
├─ Dockerfile         # API image configuration
└─ README.md          # This file

💡 Development

For local development (outside Docker) you will need:

  • Node.js (v24+ recommended)
  • npm
  • Set up environment variables in .env

Running the project locally without Docker is optional but useful for debugging or quick testing.

Authentication quick notes

  • Most GraphQL operations require Clerk JWT in the Authorization header:
    • Authorization: Bearer <CLERK_JWT>
  • Public operations are annotated with @Public() and do not require auth.
  • Admin-only operations use @Admin() and require privateMetadata.isAdmin=true on Clerk user.

📞 Contact

For questions or suggestions, open a GitHub issue or contact the project team.


⚖️ License

This project is licensed under the MIT License.

About

The Epistudium GraphQL API provides a flexible and efficient interface to interact with the Epistudium platform. Built with NestJS and powered by Apollo GraphQL, it enables developers to query and manipulate educational data through a single endpoint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors