Trip Planner created during the NLW Journey event by Rocketseat
This is the backend for the Plann.er project, a Trip Planner created during the NLW Journey event by Rocketseat, in the Node.js track. We used Node.js with technologies like Fastify, Zod, Prisma, Dayjs, and Nodemailer, all with TypeScript.
This project allows you to create travel plans with start and end dates, add participants, and manage activities and links related to the trip.
Make sure you have the following software installed on your system:
Follow these steps to set up and run the project locally.
git clone https://github.com/UsgMathe/plann.er-backend.git
cd plann.er-backend
npm install
Create a .env
file in the root of the project with the following content:
DATABASE_URL="file:./dev.db"
API_BASE_URL="http://localhost:your_port"
WEB_BASE_URL="frontend_url"
PORT=desired_port
npm run dev
This will start the development server in DATABASE_URL
.
{{ DATABASE_URL }}/trips
{
"destination": "Destination",
"starts_at": "2024-07-18 07:30:00",
"ends_at": "2024-07-27 18:00:00",
"owner_name": "name",
"owner_email": "[email protected]",
"emails_to_invite": ["[email protected]", "[email protected]"]
}
{{ DATABASE_URL }}/trips/:trip_id
{
"destination": "Destination",
"starts_at": "2024-07-18 07:30:00",
"ends_at": "2024-07-27 18:00:00"
}
{{ DATABASE_URL }}/trips/:trip_id
{{ DATABASE_URL }}/trips
{{ DATABASE_URL }}/trips/:trip_id/confirm
{{ DATABASE_URL }}/trips/:trip_id/invites
{
"email": "[email protected]"
}
{{ DATABASE_URL }}/trips/:trip_id/participants
{{ DATABASE_URL }}/participants/:participant_id
{{ DATABASE_URL }}/participants/:participant_id/confirm
{{ DATABASE_URL }}/trips/:trip_id/activities
{
"title": "Coffe",
"occours_at": "2024-07-27 05:50"
}
{{ DATABASE_URL }}/trips/:trip_id/activities
{{ DATABASE_URL }}/trips/:trip_id/links
{
"title": "Trip Playlist",
"url": "https://open.spotify.com/playlist/6E833f42r1aCkmJFipyl5Q?si=74bd776d3aee4231"
}
{{ DATABASE_URL }}/trips/:trip_id/links
To learn more about the technologies used in this project, check out the following resources:
I hope this documentation is clear and helps with the setup and execution of the project!