Inspiration
The issue of delivery being very inefficient has bothered me for a long time. I got into programming to use software to make processes more efficient, and increase the speed and utility of things overall. I think its important that an app exists so you can just get in your car whenever you want and have the ability to deliver goods to others who are in need of them. Not only that, but with this app, you can deliver multiple items at once and we would all be inspired by the power of delivery if it were only more of a team effort.
What it does
This app brings people together so that instead of going through a company to have something delivered, they can get it privately delivered by others on the internet. This is extremely beneficial because unlike food delivery, drivers of cars and trucks can pick up multiple orders for different customers at the same time. This will make ==delivery much cheaper== and will also produce a lot more money for the person delivering goods to customers. This app is a win-win situation for everyone.
How we built it
We built it by using the mapbox API and asking for addresses in a form. Then after getting those addresses, we plotted points on a map and calculated the distance from a starting address to the end of the delivery for every individual customer. In reality, this problem is a very difficult one to solve if we were using advanced algorithms to do it, but we decided to just take the distance from the user's address and the address that the user entered in the system for the item they were looking to pick up. For our tech stack, our entire application was completely typesafe with typescript on the frontend and prisma and trpc on the backend.
Challenges we ran into
We had a big challenge with authentication and authorization. We had trouble modifying the session that next-auth provided us with. I'm glad that we worked on this project because it has taught us so much about authentication and what you can and can't do when storing sessions and users. I also liked getting the experience to program a website with compatibility with both Discord and Google sign-on. Additionally, we had a very big challenge with setting up relations in my database. Setting up the delivery driver model, and the user model was a little tricky.
Accomplishments that we're proud of
We are very proud of finishing this project in its entirety and using a mapping api for the first time. This is the first any of us have experience with using a mapping software. It was extremely challenging, but I'm so glad I got the chance to work with others and do it. Additionally, we are proud that we were able to build two different levels of authentication through drivers and individual users in our website. I'm also proud that we were able to make a very clean website without very many errors and I think our team made a solid, mostly-finished product.
What we learned
We learned a lot about authentication. We learned so much about how sessions work and how to refresh sessions with new tokens or destroy sessions and create them again when logging in and logging out. We also learned how to work in a team better and we helped each other out when it came down to writing typescript on the frontend because that can be hard sometimes too.
What's next for PrivateDelivery
I am hopeful that PrivateDelivery will be an actual website in the future. I think it has some real potential once we are able to get it hosted and running. I think it needs more tweaks in order to be an actual business idea, but I really do think that connecting people online for delivery could be a great business venture.
Built With
- mapbox
- next-auth
- nextjs
- postgresql
- prisma
- react
- trpc
- typescript
Log in or sign up for Devpost to join the conversation.