Here is the complete README.md for you to copy:
This repository contains the backend for Amastay, a Flask-based API designed for OTP-based authentication and property management using Supabase.
Before running the project, ensure the following are installed:
- Python 3.9 or higher
- Pip (Python package installer)
- Virtualenv (optional but recommended)
- Supabase Account and Project (for authentication)
-
Clone the repository:
git clone https://github.com/yourusername/amastay.git cd amastay -
Create and activate a virtual environment:
- On macOS/Linux:
python3 -m venv venv source venv/bin/activate - On Windows:
python3 -m venv venv venv\Scripts\activate
- On macOS/Linux:
-
Install the project dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Copy the
.env.examplefile to.env:cp .env.example .env
- Edit the
.envfile to include your SupabaseSUPABASE_URLandSUPABASE_KEY.
- Copy the
-
Run the Flask app:
python3 app.py
The app will run by default on http://localhost:80.
POST /api/v1/auth/send_otp- Sends an OTP to the specified phone number.POST /api/v1/auth/verify_otp- Verifies the OTP for the phone number.POST /api/v1/auth/refresh_token- Refreshes the access token using the refresh token.
If you encounter any issues, check the logs in the app.log file located in the root directory.
This README includes steps for setting up the project, installing dependencies, configuring environment variables, and running the app. Let me know if you need any changes!