Skip to content

GoalPost-Earth/GoalPost

Repository files navigation

Deploy to Vercel

GoalPost Prototype 1

Installation Instructions

This document provides step-by-step instructions for setting up the GoalPost prototype on your local machine.

The prototype is built using Next.js, Neo4j, and includes optional AI features powered by OpenAI.

Prerequisites

Before setting up GoalPost, make sure you have:

  1. Node.js (v18 or higher)
  2. Git
  3. Free accounts with:

Step 1: Clone the Repository

git clone https://github.com/rdamashek/GoalPost.git
cd GoalPost
npm install

Step 2: Set Up Neo4j Aura Free

  1. Create a Neo4j Aura account and log in
  2. Create a new free database
  3. When the database is ready, find and note your:
    • Database URI (e.g., neo4j+s://xxxxxxxx.databases.neo4j.io)
    • Username (default: neo4j)
    • Password (generated by Aura)

Step 3: Set Up OpenAI API (If Using Optional AI Features)

  1. Create or log in to your OpenAI account
  2. Navigate to https://platform.openai.com/api-keys
  3. Create a new API key and note it

Step 4: Set Up Resend for Email Functionality

  1. Create or log in to your Resend account at https://resend.com/
  2. Navigate to the API Keys section in your dashboard
  3. Create a new API key and note it

Step 5: Create Environment File

Create a .env.local file in the project root directory (use the .env.example file as a template).

How to get required secrets and variables:

  • JWT_SECRET: Used for signing and verifying JSON Web Tokens for authentication.

    • For local development, generate a strong random string:
      openssl rand -base64 64
      Copy the output and use it as your JWT_SECRET in .env.local.
    • For production, ensure you use a cryptographically secure random string.
  • PEPPER: Generate a random string (at least 32 characters). You can use openssl rand -base64 32 or an online password generator. Example:

    openssl rand -base64 32

    Copy the output and use it as the value for PEPPER in your .env.local.

  • NEXT_PUBLIC_EMAIL_FROM: Set this to the email sender you want for transactional emails. Example:

    NEXT_PUBLIC_EMAIL_FROM="Goalpost <info@goalpost.earth>"
  • NEXT_PUBLIC_BASE_URL: Set this to your local or production base URL. For local development, use:

    NEXT_PUBLIC_BASE_URL=http://localhost:3000
  • RESEND_API_KEY: Required for sending transactional emails via the Resend email service. To obtain a key:

    1. Go to https://resend.com/ and sign up or log in.
    2. Navigate to the API Keys section in your Resend dashboard.
    3. Create a new API key and copy it.
    4. Add it to your .env.local as:
      RESEND_API_KEY=your-resend-api-key

Step 6: Initialize the Database

Run the initialization script to populate your Neo4j database if you want to use the seed data:

npm run init:db

Step 7: Start the Development Server

npm run dev

The application should now be running at http://localhost:3000.

Authentication

The application uses a custom JWT-based authentication system with the following features:

  • User registration and login
  • Password reset functionality via email
  • JWT token-based session management
  • Automatic token refresh
  • Secure logout

Users can sign up with an email and password, and the system handles password hashing, token generation, and email verification for password resets.

Step 8 (Optional): Deploy to Vercel

If you want to deploy your application to Vercel, follow these steps:

  1. Create a Vercel account and log in
  2. Connect your GitHub repository to Vercel
  3. Configure the environment variables in your Vercel project settings
  4. Deploy your application

Enabling AI

To enable AI features, make sure to set the OPENAI_API_KEY in your .env.local file. There is a toggle in the sidebar that will enable or disable the AI features. The AI features are currently in development and may not be fully functional.

### NOTE: The prototype is a work in progress and may not include all features or be fully functional. It is intended for demonstration purposes only. Please report any issues or suggestions to the repository's issue tracker.

About

Below is link to the demonstration instance of GoalPost. It contains test data from fictional people and communities. To access the demo, here are the credentials to use. Username: leon.schmidt@example.de — Password: nemna7-xajhux-gerjIm

Resources

License

Stars

3 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages