article-app Tailwind Templates

Article App

1. Backend Development (FastAPI Python & Integration with MongoDB) 2. Frontend Development (React, HTML, Tailwind CSS) 3. Docker setup and Build with docker 4. Integration with OpenAI API 5. Working with Vector Database (Pinecone)

Project Setup Guide


Project Structure

  • Article-backend: Contains backend code, including API and database models.
  • Article-frontend: Contains frontend code, including UI and application logic.

Notes

  • Ensure that the backend is running before starting the frontend.
  • Verify that all environment variables are properly set up in .env.dev for the backend to work as expected.

Backend Setup (Article-backend)

  1. Navigate to the backend directory:

    cd Article-backend
    
  2. Environment Setup:

    • Copy the sample environment file:

      cp .env.sample .env.dev
      
    • Open .env.dev and replace placeholder values (e.g., SECRET_KEY, DATABASE_URL, etc.) with your actual secret keys and credentials.

  3. Create a virtual environment and activate it:

    • Create a virtual environment:

      python -m venv venv
      
    • Activate the virtual environment:

      • For Windows:

        .\venv\Scripts\activate
        
      • For macOS/Linux:

        source venv/bin/activate
        
  4. Install required packages:

    pip install -r requirements.txt
    
  5. Run the backend server:

    python main.py
    

Frontend Setup (Article-frontend)

  1. Navigate to the frontend directory:

    cd Article-frontend
    
  2. Install dependencies:

    npm install
    
  3. Run the frontend server:

    npm start
    

Docker Setup

  1. Environment Setup:

    • Navigate to the Article-backend directory:

    • Copy the sample environment file:

      cp .env.sample .env.dev
      
    • Open .env.dev and replace placeholder values (e.g., SECRET_KEY, DATABASE_URL, etc.) with your actual secret keys and credentials.

  2. Run Docker:

    • Return to the root directory:

      cd ..
      
    • Run Docker Compose with the following command:

      docker-compose up --build
      

Top categories

Loading Svelte Themes