Skip to content

Setting Up the .env File

Daaimah Tibrey edited this page Jul 7, 2025 · 8 revisions

πŸ› οΈ Setting Up the .env File

This project requires a .env file to securely manage sensitive credentials, API keys, database settings, and dynamic dates. This file is not committed to Git and must be created manually by each developer.

πŸ“ Steps to Set It Up

  1. In the root of the project directory, create a new file called .env.
  2. Copy the structure below into your .env file.
  3. Replace all placeholder values (string, url, or date formats like %m/%d/%Y) with your actual configuration values.

Here is a sample .env to get you up and running, but note that the job posting feature, Eventbrite events and database will not work.

APP_OPEN_DATE='03/10/25 12:00:00'
APP_EXTENDED='true'

For the job posting feature to run the following credentials are necessary:

ENVIRONMENT, SQUARE_APPLICATION_ID,  SQUARE_ACCESS_TOKEN, SQUARE_LOCATION_ID, SLACK_WEBHOOK, & PAYMENT_FORM_URL

To access the comprehensive credentials, please contact Techtonica staff through Slack #website channel

πŸ” Environment Variables

🌍 Environment Setting - Your environment, either "local", "prod", "staging", or "testing"

ENVIRONMENT=local

πŸ”— Third-Party API Credentials

# Required for integrating with Square APIs. If Square values are missing, payment feature will not render on the job posting page.
SQUARE_APPLICATION_ID=string
SQUARE_ACCESS_TOKEN=string
SQUARE_LOCATION_ID=string

# Required to populate and display Techtonica events from Eventbrite. If Evenbrite credential is missing, Events will not display.
EVENTBRITE_OAUTH_TOKEN=string

# Slack Webhook URL for posting the job listing into Slack
SLACK_WEBHOOK=url string

# Public-facing URL for the payment form
PAYMENT_FORM_URL=url string

πŸ›’οΈ Database Configuration

DB_USERNAME=string
DB_PASSWORD=string
DB_HOST=string
DB_NAME=string

πŸ“† Application Timeline Variables

These dates are used to control application logic. If a value is left as a format string (like %m/%d/%Y), the system will auto-calculate it as programmed in dates.py. However, if the values specifically for APP_OPEN_DATE & APP_EXTENDED missing, content related to the Techtonica Software-engineer-in-training program application will not render and default text will be displayed. Also, on the mentor page, the mentorship timeline table will not render at all.

πŸ—“ Expected Date Formats:

  • Some dates require a full timestamp: MM/DD/YY HH:MM:SS (e.g., 09/10/24 12:00:00)
  • Others only need a date: MM/DD/YY or MM/DD/YYYY
  • Booleans must be lowercase: 'true' or 'false'
APP_OPEN_DATE='MM/DD/YY HH:MM:SS'
APP_EXTENDED='true'

APP_CLOSE_DATE="%m/%d/%Y"
INFO_SESSION="%m/%d/%Y %H:%M:%S"
APPLICATION_WORKSHOP="%m/%d/%Y"
PAIR_PROGRAMMING_WITH_STAFF="%m/%d/%y"
TAKE_HOME_CODE_CHALLENGE="%m/%d/%Y %H:%M:%S"
INTERVIEW_FINANCIAL_CONVOS="%m/%d/%y"
NOTIFICATION_DAY="%m/%d/%Y"
ONBOARDING_DAY="%m/%d/%Y"
PRE_WORK_START="%m/%d/%Y"
START_MONTH="%B"
START_YEAR="%Y"
COHORT_START_DAY="%m/%d/%Y"
COHORT_HALF="%m/%d/%Y"
TRAINING_END="%m/%d/%Y"
JOB_SEARCH_END="%m/%d/%Y"

βœ… Notes

  • This file is ignored by Git by default (.gitignore).
  • Reach out to Techtonica Website Owners if you're unsure about any values.
Clone this wiki locally