A full-stack SaaS application built with FastAPI for backend, featuring user authentication, subscription management, job posting, and file uploads. This project provides a clean and organized codebase with a modular structure to easily extend and maintain.
uploads/ # Folder for file uploads (e.g., images, documents)
app/ # Application core logic
├── auth/ # Authentication-related logic
├── configs/ # Configuration files (API settings)
├── constants/ # Constant values and enums
├── db/ # Database-related logic and connection
├── dependencies/ # Dependency injection utilities (e.g., user authentication)
├── models/ # Data models (schemas and DB models)
├── routes/ # API routes (endpoints)
├── services/ # Business logic and services
├── utils/ # Utility functions
├── validation_schema/ # Pydantic schemas for data validation
└── tsconfig.json
.env # Environment variables configuration (e.g., DB URI, secret keys)
.python-version # Python version used for the project
.gitignore # Git ignore file to avoid unwanted files in version control
main.py # Entry point for the FastAPI app
uv.lock # Uvicorn lock file for deployment- Python 3.x
- MongoDB (or other databases as per configuration)
-
Clone the repository:
git clone https://github.com/jsdevrazu/fastsass cd fastsass -
Setup a uv in your dev machine:
pip install uv
-
Install the required dependencies:
rm uv.lock uv run main.py
-
Set up environment variables:
- Create a
.envfile in the root directory and add the necessary environment variables:MONGO_URI = mongo_uri DB_NAME = fastsasss SECRET_KEY = your-secret-key ALGORITHM = HS256 API_KEY= your-api-key GOOGLE_CLIENT_ID = your_client_id GOOGLE_CLIENT_SECRET = your_client_secret STRIPE_SECRET_KEY= stripe-secret GITHUB_CLIENT_ID=github client secret GITHUB_CLIENT_SECRET=github client id STRIPE_WEBHOOK_SECRET= webhook-secret STRIPE_SUCCESS_URL=http:// STRIPE_CANCEL_URL=http:// OPEN_API_KEY=open router api key CLIENT_URL=http://localhost:3000
- Create a
-
Create the
uploadsfolder for storing file uploads:mkdir uploads
-
Run the application:
uvicorn main:app --reload
- The app will be running on
http://localhost:8000.
- User Authentication: JWT-based authentication, including login, registration, and password reset.
- Subscription Management: Integration with Stripe for managing subscriptions and payments.
- Job Posting: Create and manage job posts with rich details.
- File Uploads: Handle file uploads for various resources like images, resumes, etc.
- REST API: Fully functional REST API for interacting with the system.
- All file uploads (e.g., images, documents) are saved in the
uploads/directory. - You can configure file size limits and types within the app's settings.
- POST /auth/register: Register a new user
- POST /auth/login: Login and receive a JWT token
- POST /auth/forgot-password: Reset password via email
- POST /auth/reset-password: Reset password with a token
- POST /jobs/post: Post a new job
- GET /jobs: Fetch all job posts
- GET /jobs/{id}: Fetch a single job post by ID
- POST /pay/subcribe: Start a new subscription
- POST /pay/webhook: Stripe webhook to handle payment confirmations