tupuio / tupuapp

Tupu web application based on Next.js & Xata.io
https://tupu.io
Apache License 2.0
4 stars 3 forks source link

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Quick start

  1. Make sure you have Node.js and npm installed.

  2. Create a .env.local file in the root folder of the project, with the contents that we have shared with you privately.

  3. Install all the dependencies if not already done:

    npm install
  4. Run the development server:

    npm run dev

Open http://localhost:3000 with your browser to see the result.

Details

  1. Make sure you have a recent version of Node.js and npm installed. To verify this you can run the commands node --version and npm --version, in your terminal, e.g.:

    $ node --version
    v14.18.0
    $ npm --version
    8.3.0
  2. Clone the repository:

    $ git clone git@github.com:tupuio/tupuapp.git
  3. Enter in the just created folder, and install all the dependencies (among them, there will be Next.js):

    $ cd tupuapp
    tupuapp$ npm install
  4. Create an .env.local file, mind the filename starting with a dot, open your favourite code editor, and fill the file with the contents that we have shared with you privately (probably through https://cryptobin.co/ or https://yopass.se/):

    tupuapp$ touch .env.local
    tupuapp$ code .
  5. We use SendGrid in order to send notification emails. Create a free acount on https://sendgrid.com/go/email-smtp-service-signup-sales-1. Afterwards create a SendGrid API's key https://docs.sendgrid.com/ui/account-and-settings/api-keys#creating-an-api-key and add it to your .env.local file under SENDGRID_API_KEY.

  6. Set a SENDGRID_EMAIL_VERIFIED_SENDER in your .env.local with a SendGrid verified sender (for the same API key). https://docs.sendgrid.com/ui/sending-email/sender-verification

  7. In order to not spam real people with notifications while developing, set DEV_EMAIL_RECIPIENT in .env.local with your email to receive all the notification emails to your inbox while developing.

  8. After filling in the file .env.local, if you use VSCode, you could open a new terminal (Terminal -> New Terminal or simply Ctrl+Shift+`), or use again the previous terminal, and start the the development server with:

    tupuapp$ npm run dev
  9. Open http://localhost:3000 with your browser, and you should see the login page

  10. Try to login with the user test and password app to test the connection to the server database (you need to be connected to the internet, and have correctly set the .env.local file in the root of the Tupu application).