This is the backend of the Project Gutenberg Explorer, built with NestJS. It provides APIs to fetch book content and metadata from Project Gutenberg and perform text analysis using the SambaNova Cloud API.
- Fetch Book Content: Retrieve e-book content and metadata from Project Gutenberg.
- Text Analysis: Endpoints for key character extraction, language detection, sentiment analysis, and summarization using SambaNova API.
- Configuration: Easily manage API keys and endpoints.
- NestJS: A progressive Node.js framework for building efficient and scalable server-side applications.
- Axios: For making HTTP requests to external APIs.
- RxJS: To work with asynchronous data streams.
-
Clone the Repository:
git clone https://github.com/yourusername/project-gutenberg-backend.git cd project-gutenberg-backend -
Install Dependencies:
npm install
-
Configure Environment Variables: Create a .env file in the root directory with the following variables:
SAMBANOVA_API_KEY=your_sambanova_api_key BASE_URL=https://api.sambanova.ai/v1
-
Run the Server:
npm run start:dev
-
API Endpoints:
- GET /book/getMetadata
- GET /book/getContent
- POST /text-analyzer/key-characters
- POST /text-analyzer/language-detection
- POST /text-analyzer/sentiment-analysis
- POST /text-analyzer/summary
- /src: Contains the main source code, including services, controllers, and configuration.
- /src/config: Configuration service for managing API keys and settings.