Code Monkey home page Code Monkey logo

tripify's Introduction

Tripify

Architecture des fichiers

L'application est structurée comme suit :

  • src/ : Contient le code source de l'application.
    • lib/ : Contient les fonctions utilitaires et les actions de l'application.
      • actions/ : Contient les actions de l'application, comme createUser.ts pour la création d'un utilisateur.
      • map.ts : Contient les fonctions liées à la carte.
    • app/ : Contient le code de l'application principale.
      • travel/ : Contient le code lié aux voyages.
        • new-trip/ : Contient le code pour la création d'un nouveau voyage.
  • prisma/ : Contient le schéma Prisma pour la base de données.
    • schema.prisma : Le schéma de la base de données.

Stack technique

  • Langages : TypeScript, SQL, JavaScript
  • Gestionnaire de paquets : npm
  • Frameworks : React
  • Base de données : PostgreSQL avec Prisma comme ORM
  • Cartographie : Leaflet avec le fournisseur OpenStreetMap

Exigences

  • Node.js et npm installés sur votre machine.
  • PostgreSQL installé et configuré sur votre machine.
  • Un compte GitHub pour cloner le dépôt.

Développement local

  1. Clonez le dépôt sur votre machine locale.
  2. Installez les dépendances avec npm install.
  3. Configurez votre base de données PostgreSQL et mettez à jour le fichier .env avec l'URL de votre base de données.
  4. Exécutez les migrations de la base de données avec npx prisma migrate dev.
  5. Démarrez l'application avec npm start.

Tests

Pour tester l'application localement, suivez les étapes suivantes :

  1. Installez les dépendances de test avec npm install --only=dev.
  2. Exécutez les tests avec npm test.

Note : Assurez-vous que votre base de données est correctement configurée avant de lancer les tests.

tripify's People

Contributors

lxdovic avatar meymounb avatar silfarnos avatar pauljhonson26 avatar

Watchers

 avatar  avatar

tripify's Issues

[FEATURE] Page 404

Is your feature request related to a problem? Please describe.
Add a page 404

Describe the solution you'd like
use the not-found.tsx from react's app router

[FEATURE] Navbar

Is your feature request related to a problem? Please describe.
Implement shadcn/ui navigation menu.

[FEATURE] Add Dexie.js to use IndexedDB

Problem:

We need to store data (search history and the DATAtourisme JSON)

Solution :

We can use Dexie.js to easily access the client browser IndexedDB to store this data

Alternatives
Adding an authentication system for the user and an SQL database.
Would take longer and still have the same usefulness.
Also, I want to learn how to use Dexie.js

Viability and Impact

  • Totally doable
  • Definitely necessary for the minimum requirements of the project

[FEATURE] Prisma or other ORM implementation in the "back end" side

Is your feature request related to a problem? Please describe.
We need to store a HUGE JSON file that gets updated everyday (It's about 750 MB). We can't just store that in our indexedDB
Describe the solution you'd like
Implement an SQL or other database to store the contents of that JSON everyday, and have the server pull data from it on demand
Describe alternatives you've considered
Err, idk. Downloading and storing the JSON client side?
Additional context
The JSON is from DATAtourisme and is updated once a day, so the server will need to check how old its own is and re download it if it's more than 24h old
Viability and Impact

  • It's doable
  • It's necessary

[FEATURE] Routing

Is your feature request related to a problem? Please describe.
In order to provide routing for our users, we will need to implement some routing features. We need to:

  • Be able to give waypoints on a map (at least 2)
  • Have a suggestions of hotels & restaurants & more on the way
  • Have suggestions of hotels and activities at every waypoint other than the start

Describe the solution you'd like
Use leaflet's data and leaflet routing machine

Describe alternatives you've considered
I've considered using google maps but it's probably no cheap
Leaflet routing machine, on the other hand is free and powerful

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.