Skip to content

freeCodeCamp-2025-Summer-Hackathon/purple-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purple-array

Repository for the purple-array team's work.

WriteLight

WriteLight is a full-stack app that helps users learn new vocabulary through daily reflection and action. Each day, users receive a new word and are challenged to use it meaningfully in their lives. After using their word, they journal their experience by answering prompts like: How did you use today’s word? What gave you hope? What did you learn? How did you show kindness? The app fosters language growth, self-awareness, and positivity—one word at a time.

WriteLight

WriteLight-Dark-Theme

Made With

Node.js Express.js React.js

Required Software Install

Node.js & Node Package Manager (npm)

  1. Download and install Node.js (LTS v22) from the official website

Clone the Repository

git clone https://github.com/freeCodeCamp-2025-Summer-Hackathon/purple-array.git
cd purple-arrray

MongoDB Setup

  1. Create an account on MongoDB

  2. If you are creating an account for the first time, you will be taken to the “Deploy your cluster” page. Select the following options:

    • Free
    • Uncheck “preload sample data”
    • Name your cluster
    • Create deployment
  3. Create a database user – keep your username/password somewhere, just in case

    • Create Database User
  4. Click “Choose a connection method”

    • Click “Drivers”
      • Set “Driver” to “Node.js”
      • Copy the “connection string” below. Make sure it includes the password
        THIS IS YOUR LAST CHANCE TO GRAB YOUR PASSWORD
  5. Click “Done”

  6. Click “Network Access” (left bar) and “+ADD IP ADDRESS” (green button)

    • “Allow Access From Anywhere”

🧪 Your Local Dev Environment Setup

  1. Make sure you have pulled the most recent version of the project’s main branch from GitHub.
    • switch to the main branch if you are not already on it, and then run git pull
 git switch main
 git pull
  1. Change directories into the backend folder
cd backend
  1. Create a “.env” file inside the backend folder (make sure it’s at the top level, and not nested in an additional folder).
  2. Create the variable MONGO_URI= followed by the connection string you copied earlier; your Mongo Uniform Resource Indicator (URI), represented by the placeholder value in the brackets below.
MONGO_URI=<Your_Mongo_URI>
  • Please note: you don't include any quotation marks or the angle brackets.
  • The string will look something like this:
mongodb+srv://<YOUR_USERNAME>:<YOUR_PASSWORD>@<CLUSTER_NAME>.iva3yfn.mongodb.net/?retryWrites=true&w=majority$appName=<CLUSTER_NAME>
  1. Additionally, you can add a name for the database by adding it to URI after the iva3yfn.mongodb.net/ portion of the string, as shown below:
mongodb+srv://<your_username>:<your_password>@<cluster_name>.iva3yfn.mongodb.net/<ADD_DB_NAME_HERE>?retryWrites=true&w=majority$appName=<cluster_name>
  1. Now add your PORT variable to the .env file and set it to PORT=5001

  2. Now add the following variables to your .env as well: NODE_ENV=development

  3. Lastly you'll need a JSON Web Token Secret key in your .env file as well. It will be in the following format JWT_SECRET=<Secret_String> where <Secret_String> is the appropriate JWT key. The JWT key just needs to be a unique, randomized alphanumeric string. We recommend that it be it at lest 64 characters. You can create a unique string here if you don't already have a preferred method.

Please ensure that you now have all of the following environment variables in your .env file, including the Node environment variable with value set to development as shown below.

MONGO_URI=<Your_Mongo_URI>

PORT=5001

NODE_ENV=development

JWT_SECRET=<Secret_String>

✔️ Load your Database

The script to load your database is located directly in the backend directory and must be run from that directory. To run the script please open a terminal window and run the following commands:

cd backend
node seed-database.js

🔧 Run the Backend

In a terminal window please run the following:

cd backend
npm install
npm run dev

💻 Run the Frontend

In another terminal window please also run:

cd frontend
npm install
npm run dev

Contributors to this Repository

About

Repository for the purple-array team's work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published