Git Product home page Git Product logo

trvlro's Introduction

TRVLRO

Trvlro is an app designed to provide personalized travel itineraries for cities in Romania. It leverages user personality data and city profiles to make tailored suggestions.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Poetry
  • Npm

Installing

Backend

To run the backend, you will need to have the .env and _service_account_keys.json(Firestore Credentials) files in your backend directory. This file contains environment variables necessary for the backend to run correctly.

# Navigate to the backend directory
cd backend

# Install dependencies
poetry install

# Run the backend
poetry run python -m trvlro

This will start the server on the configured host. You can find swagger documentation at /api/docs.

Frontend

To run the frontend, you will also need to have the .env.local file in your frontend directory. This file contains environment variables necessary for the frontend to run correctly.

# Navigate to the frontend directory
cd frontend

# Install dependencies
npm install

# Run the frontend
npm start

This will start the frontend on the configured host.

Deployment

Backend

You can start the project with docker using this command:

docker-compose -f deploy/docker-compose.yml --project-directory . up --build

If you want to develop in docker with autoreload add -f deploy/docker-compose.dev.yml to your docker command. Like this:

docker-compose -f deploy/docker-compose.yml -f deploy/docker-compose.dev.yml --project-directory . up --build

This command exposes the web application on port 8000, mounts current directory and enables autoreload.

But you have to rebuild image every time you modify poetry.lock or pyproject.toml with this command:

docker-compose -f deploy/docker-compose.yml --project-directory . build

Frontend

First you have to build the static files:

npm run build

Then you can serve them on the cloud, or on-prem with:

npm run serve

Built With

  • React - The web framework used
  • FastAPI - The backend framework used
  • Poetry - Dependency Management

Structure

Backend

$ tree "trvlro"
trvlro
├── conftest.py  # Fixtures for all tests.
├── __main__.py  # Startup script. Starts uvicorn.
├── services  # Package for different external services such as rabbit or redis etc.
├── settings.py  # Main configuration settings for project.
├── static  # Static content.
├── tests  # Tests for project.
└── web  # Package contains web server. Handlers, startup config.
    ├── api  # Package with all handlers.
    │   └── router.py  # Main router.
    ├── application.py  # FastAPI application configuration.
    └── lifetime.py  # Contains actions to perform on startup and shutdown.

Authors

  • Stefan Faur - Backend API, Frontend - stefanfaur
  • Adel Drinceanu - Frontend, Authentication - Adel0s

License

This project is licensed under the MIT License - see the LICENSE.md file for details

trvlro's People

Contributors

stefanfaur avatar adel0s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.