A .NET CRUD API for digital nomads to log their travels, share recommendations, and connect with other travelers.
This project is a travel logging site for digital nomads, allowing users to:
- Register and sign in using email as a unique identifier
- Edit their profile with a description and image URL
- Add logs of cities they've visited, with comments
- Add recommendations for places of interest in cities
- View lists of recommendations and users by city
- Upvote recommendations
- Create a new repository using this template. Then each group member should clone that repository.
- Important: Update the database connection string in
appsettings.Development.json
with your actual PostgreSQL password:"TravelLoggerDbConnectionString": "Host=localhost;Port=5432;Database=TravelLogger;Username=postgres;Password=YourActualPasswordHere"
- Run the following commands to set up the database:
dotnet ef migrations add InitialCreate
dotnet ef database update
- Start the application:
dotnet run
- Access the API at
http://localhost:5000
- Use Swagger UI at
http://localhost:5000/swagger
to explore and test the API
Note: We've configured the application to use HTTP instead of HTTPS for simplicity during development.
POST /api/users
- Register a new userGET /api/users/signin/{email}
- Sign in a user by emailGET /api/users/{id}
- Get user profile, with all their logs and recommendationsPUT /api/users/{id}
- Update user profileGET /api/cities/{cityId}/users
- List users by city (based on their most recent log)
GET /api/cities
- List all citiesGET /api/cities/{id}
- Get city details, with logs, users there, and recommendations
POST /api/logs
- Create a new logPUT /api/logs/{id}
- Update a logDELETE /api/logs/{id}
- Delete a logGET /api/users/{userId}/logs
- List logs by userGET /api/cities/{cityId}/logs
- List logs by city
POST /api/recommendations
- Create a new recommendationPUT /api/recommendations/{id}
- Update a recommendationDELETE /api/recommendations/{id}
- Delete a recommendationGET /api/cities/{cityId}/recommendations
- List recommendations by cityGET /api/recommendations/{id}
- Get recommendation details, including total number of upvotes
POST /api/upvotes
- Add an upvote to a recommendationDELETE /api/upvotes/{id}
- Remove an upvote from a recommendation
- Begin by considering the data structure, building an Entity Relationship Diagram, and laying out tasks in a Github project board.
- Include all API endpoints in Program.cs. Yes, this will cause conflicts to resolve in GIT as you divide tasks and work independently. Yes, this is intentional, to put you through the ringer practicing GIT workflow with proper pull requests.
- Entity Framework Core should be used for database operations, and the database should be seeded with initial data for cities, users, logs, recommendations, and upvotes
- DTOs should be used to limit the properties that are sent and received
- Authentication should just use email as a unique identifier. Make sure users can't edit or delete other users' data.