Skip to content

jsdevrazu/fastsass

Repository files navigation

FastSaaS Project

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.

Project Structure

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

Setup and Installation

Prerequisites

  • Python 3.x
  • MongoDB (or other databases as per configuration)

Steps to Set Up

  1. Clone the repository:

    git clone https://github.com/jsdevrazu/fastsass
    cd fastsass
  2. Setup a uv in your dev machine:

        pip install uv
  3. Install the required dependencies:

    rm uv.lock
    uv run main.py
  4. Set up environment variables:

    • Create a .env file 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
  5. Create the uploads folder for storing file uploads:

    mkdir uploads
  6. Run the application:

    uvicorn main:app --reload
  1. The app will be running on http://localhost:8000.

Features

  • 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.

File Upload

  • 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.

API Endpoints

Authentication

  • 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

Jobs

  • POST /jobs/post: Post a new job
  • GET /jobs: Fetch all job posts
  • GET /jobs/{id}: Fetch a single job post by ID

Subscription

  • POST /pay/subcribe: Start a new subscription
  • POST /pay/webhook: Stripe webhook to handle payment confirmations

About

Sass Web Application Job Portal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •