Skip to content

entel-me/entel

Repository files navigation

Logo

entel - Share Your Needs

Overview

Replace the unnecessary walk to the next supermarket by a new shoppinglist in entel. If you are going to the store, help others close to you by accepting their shopping list and bring them the products they need!

entel is a modern web app that is built with Blitz.js, a full-stack React framework, made to boost productivity. A hosted version can be found at entel.me

Features

Feature
Create an account
📆 Create a new shoppinglist
🤝 Accept and complete shoppinglists from others
📲 Chat with the owners to organize shopping
✉️ Email confirmations and reminders
Many thanks to Roman for creating the cute logo 💖

This project follows the all-contributors specification. Contributions of any kind welcome!

Setup entel locally

To run entel locally, you need to install NodeJS and npm. Additionally, you should be able to run PostgreSQL on your machine. You can achieve this by

  • installing it natively on your computer or
  • via docker.

First steps ✨

But first of all, you have to clone and open this repository.

git clone https://github.com/entel-me/entel.git
cd entel

After that, you should be able to install the dependencies with npm.

npm i

Great! Let's start with setting up environment variables. 🔥

Setup enviroment variables 📝

First, you have to create two empty files.env.local and env.test.local. You can specify environment variables in these files. Afterward, you call them with process.env..

DATABASE_URL is an important variable that connects the PostgreSQL database with our application. If you're running PostgreSQL in docker, you set

  • username,
  • password,
  • the name of the database on your own and include them in a URL. Here is an example:
POSTGRES_USER=entel
POSTGRES_PASSWORD=crazypassword
POSTGRES_DB=enteldb
DATABASE_URL=postgresql://entel:crazypassword@localhost:5432/enteldb

If you're running PostgreSQL natively on your computer, you have to enter the URL of your database in each .local file. Please be aware that you have to remove the predev script from package.json to run entel without errors.

DATABASE_URL=postgresql://entel:crazypassword@localhost:5432/enteldb

If you want to test the mailer in mailers/, you have to add your

  • mail,
  • password,
  • and mail host to the .local files too:
MAIL_HOST=mail.privateemail.com
[email protected]
MAIL_PASSWORD=crazypassword

Great! After that, we take care of the database itself.

Run the database 📋

The last thing we have to do is migrating the database with prisma. For the following step, the database should already be running. You can achieve this with docker with the command:

docker-compose up -d

Now you can set up the database by entering:

blitz prisma migrate dev --preview-feature

Btw, if you change something in schema.prisma you have to re-run the last command. Now we can try out our application. 🥳

Run the application

To run entel you execute

blitz dev

and view your new app at http://localhost:3000/! Perfect 🎉

Have fun with the app :)

How to run entel "in production"

We use a second environment called "entel-dev" to test entel under real-world conditions. If you want, you can run your version of the application on this environment before merging it into develop. Just write to @Till-B or @antonykamp 💻.

For security reasons, these "review apps" are using the same database as "entel-dev" but not as the public environment entel.me. Also, if you send emails, they will land at the ethereal mailbox of Carolina 😉. Therefore, use the following email and password:

email: [email protected]
password: 3jqaynkSquQv5Pra1u