Skip to content

Phonebook-PostgreSQL-Python is a FastAPI-powered phonebook application with a PostgreSQL backend, offering a RESTful API and a minimalist static site crafted in TypeScript 5.3.2, utilizing Less.js for styling. Efficient and modern.

License

Notifications You must be signed in to change notification settings

Pondigo/phonebook-postgreSQL-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phonebook (FastAPI, PostgreSQL, Python, Typescript, Less.js)

A simple phonebook application with a FastAPI backend serving an API and a static site. The static site is written in TypeScript 5.3.2 without libraries, using Less.js for styling, and HTML5. The FastAPI API connects to a PostgreSQL database.

Features

  • FastAPI Backend:

    • Implements a RESTful API for managing contacts in a phonebook.
    • Utilizes FastAPI for efficient and fast development.
  • PostgreSQL Database:

    • Stores contact information in a PostgreSQL database for data persistence.
  • Static Site:

    • Written in TypeScript 5.3.2 without external libraries.
    • Uses Less.js for styling.
    • Provides a user-friendly interface for interacting with the phonebook.

Prerequisites

  • Python 3.x
  • PostgreSQL
  • Node.js (for TypeScript compilation)
  • NPM

Working on

  • Create form
  • Edit phone
  • Local host support

Getting Started

  1. Clone the repository:

    git clone https://github.com/Pondigo/phonebook-postgreSQL-Python
    cd phonebook-PostgreSQL-Python
  2. Set up the virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up the PostgreSQL database:

    • Set the credentials on the .env file.
  5. Run the FastAPI server:

    uvicorn main:app --env-file .\.env
  6. Compile TypeScript and Less.js for the static site:

    cd client
    npm run build
  7. Open the static site:

    • Open http:https://127.0.0.1:8000/ in a web browser.

License

This project is licensed under the MIT License.

About

Phonebook-PostgreSQL-Python is a FastAPI-powered phonebook application with a PostgreSQL backend, offering a RESTful API and a minimalist static site crafted in TypeScript 5.3.2, utilizing Less.js for styling. Efficient and modern.

Topics

Resources

License

Stars

Watchers

Forks