SHIFT SCALL Backend is a backend service built with FastAPI, integrating Firestore as the primary database and Redis for caching. The project handles contact management and provides APIs for creating, retrieving, and caching contact information.
- FastAPI: High-performance Python web framework for building APIs.
- Firestore: NoSQL cloud database from Google Firebase.
- Redis: In-memory data structure store, used as a cache for fast data access.
- Google Cloud Memorystore: Managed Redis instance for scalable caching.
- Create, retrieve, and manage contact information.
- Cache frequently accessed data in Redis to improve performance.
- Automatically generated API documentation with Swagger UI and ReDoc.
- Python 3.10+
- Pip (Python package manager)
- Google Cloud Firestore and Google Cloud Memorystore instances (if using GCP services)
-
Clone the repository:
git clone https://github.com/SHIFT-JP/shift-scall-backend.git cd shift-scall-backend -
Create a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Set up the environment variables by creating a .env file at the project root:
FIREBASE_CREDENTIALS=path/to/firebase_credentials.json REDIS_HOST=your_redis_host REDIS_PORT=6379
-
RUN:
npm start
OR
docker compose up --build
-
Format & Lint:
npm run format
npm run lint
-
Access the API documentation:
Swagger UI: http://127.0.0.1:8000/docs ReDoc: http://127.0.0.1:8000/redoc