Documentation Index
Fetch the complete documentation index at: https://mintlify.com/azfar-imtiaz/PayPulse-Cloud/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following installed and configured:- AWS CLI — authenticated with credentials that have permissions to create IAM roles, Lambda functions, API Gateway, DynamoDB tables, S3 buckets, Secrets Manager secrets, SNS topics, EventBridge rules, CloudWatch log groups, and Cognito identity pools
- Terraform >= 1.5.0
- Python 3.12 (matches the Lambda runtime)
- An AWS account with sufficient service limits for the resources above
The infrastructure deploys to
eu-west-1 by default. You can override this by setting aws_region in your terraform.tfvars.Steps
Configure terraform.tfvars
Create a
A minimal All other variables have sensible defaults (for example,
terraform.tfvars file in the aws-infra-terraform/ directory. This file is gitignored and must never be committed.The following variables have no default and must be provided in terraform.tfvars:| Variable | Type | Description |
|---|---|---|
gmail_secret_credentials | string (JSON) | Gmail access credentials stored in Secrets Manager |
google_oauth_client_id | string | Google OAuth client ID for Gmail API access via the iOS app |
gemini_api_key | string | API key for the Gemini Flash API used in retail invoice parsing |
terraform.tfvars looks like this:terraform.tfvars
aws_region = "eu-west-1", python_runtime = "python3.12"). You can override any of them here if needed.Before applying Terraform, create the
PayPulseAppJWTSecret secret manually in AWS Secrets Manager. Terraform reads this secret with a data source — it does not create it.Initialize and apply Terraform
Run the standard Terraform workflow from inside Review the planned changes before applying:Apply the infrastructure:When the apply completes, Terraform prints the API Gateway invoke URL:Export this URL for use in the steps below:
aws-infra-terraform/:Sign up
Create a new user account by sending a A successful response returns HTTP
POST request to /v1/auth/signup. The request body must include email, name, and password:201 with a JWT access token:User IDs are generated automatically as UUIDs prefixed with
user_. The access token is valid immediately after signup — you do not need to log in separately.Log in and get a JWT token
If you already have an account, exchange your credentials for a JWT token:A successful response returns HTTP Export the token for subsequent requests:
200:Make an authenticated request
With a valid token, you can call any protected endpoint. Retrieve the authenticated user’s profile:The response includes the user’s name, email, account creation date, and Gmail connection status:The
gmail_account_connected field indicates whether the user has linked their Gmail account via the OAuth 2.0 flow. Until Gmail is connected, invoice ingestion endpoints will not have access to the inbox.Next steps
Architecture overview
Understand how Lambda, API Gateway, DynamoDB, S3, and EventBridge fit together.
API reference
Explore all available endpoints with request and response schemas.
Gmail OAuth setup
Connect a Gmail account so invoice ingestion can access the inbox.
Terraform setup
Learn about all Terraform modules and how to customize the deployment.