Welcome to the Interneers Lab 2025 repository! This serves as a minimal starter kit for learning and experimenting with:
- Django (Python)
- React (with TypeScript)
- MongoDB (via Docker Compose)
- Development environment in VSCode (recommended)
Important: Use the same email you shared during onboarding when configuring Git and related tools. That ensures consistency across all internal systems.
- Getting Started with Git & Forking
- Prerequisites & Tooling
- Setting Up the Project
- Running Services
- Verification of Installation
- Development Workflow
- Making your first change and running it
- Running Tests (Optional)
- Frontend Setup
- Further Reading
-
Install Git (if not already):
- macOS: Homebrew users can run
brew install git
. - Windows: Use Git for Windows.
- Linux: Install via your distro’s package manager, e.g.,
sudo apt-get install git
(Ubuntu/Debian).
- macOS: Homebrew users can run
-
Configure Git with your name and email:
git config --global user.name "Your Name" git config --global user.email "[email protected]" # Use the same email you shared during onboarding
-
What is Forking?
Forking a repository on GitHub creates your own copy under your GitHub account, where you can make changes independently without affecting the original repo. Later, you can make pull requests to merge changes back if needed.
-
Fork the Rippling/interneers-lab repository (ensure you’re in the correct org or your personal GitHub account, as directed).
-
Clone your forked repo:
git clone [email protected]:<YourUsername>/interneers-lab.git cd interneers-lab
These are the essential tools you need:
-
Homebrew (macOS Only)
Why?
Homebrew is a popular package manager for macOS, making it easy to install and update software (like Python, Node, Yarn, etc.).
Install:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Python 3.13 (if you need Python scripts or a backend environment)
-
Why 3.13?
This is the recommended version for the module’s Python-related tasks, ensuring consistency across projects.
-
Install or Upgrade:
- macOS (with Homebrew):
brew install python
- Windows: Download from python.org (ensure it’s 3.13)
- macOS (with Homebrew):
-
Verify:
python3 --version
You should see something like
Python 3.13.x
.
If you are getting something else , please update
.bashrc
or.zshrc
to have alias with followingvim ~/.zshrc # or any preferred editor of your choice alias python3 = "/opt/homebrew/bin/python3.13" :wq # save the file with any equivalent command source ~/.zshrc # or ~/.bashrc
-
-
virtualenv or built-in
venv
Why?
A virtual environment keeps project dependencies isolated from your system Python.
Install
pip3 install virtualenv
(if needed)- or use
python3 -m venv venv
Tutorial Refer to the Virtualenv Tutorial to learn more about why virtual environments matter.
Verify
-
Try to activate the venv using the following command
source venv/bin/activate # macOS/Linux .\venv\Scripts\activate # Windows
-
In most of the machines, your terminal prompt will be prefixed with something like (venv) (or whatever you named the virtual environment).
Check Which Python Is Being Used:
-
macOS/Linux
which python
This should return a path inside the venv/ directory (e.g., .../my-project/venv/bin/python
-
Windows
where python
This should return a path inside
venv\Scripts\python.exe
.
-
Docker & Docker Compose
Why
We use Docker to run MongoDB (and potentially other services) in containers, preventing “works on my machine” issues.
Install
Verify
Verify verison and successfull installation with
docker --version
anddocker compose version
-
Node.js & Yarn
Why?
We use React.js for our frontend, which requires Node.js. Yarn is a popular package manager for Node.
Install
Verify
- Check version and installation completion with
node --version
andyarn --version
- Check version and installation completion with
-
API & MongoDB Tools
- Postman, Insomnia, or Paw (only for mac) for API testing
- MongoDB Compass or a VSCode MongoDB extension
The python virtual env should be created inside the backend directory. Run the following commands inside the backend
directory to create virtual environment.
cd backend
python3.13 -m venv venv
To activate the virtual environment, run the following command:
# macOS/Linux
source venv/bin/activate
# on Windows Powershell:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
.\venv\Scripts\activate
pip3 install -r requirements.txt
By default, requirements.txt includes:
- Django
- pymongo (MongoDB driver)
Check your .gitignore
Make sure venv/
and other temporary files aren’t committed.
If your Django project is in backend
, navigate there:
cd backend
Start the Django server on a port less likely to conflict (e.g., 8001
):
python manage.py runserver 8001
Open http://127.0.0.1:8001/hello/ to see the "Hello World" endpoint.
In the project root, you’ll find (or create) a docker-compose.yaml
.
To start MongoDB via Docker Compose:
docker compose up -d
Verify with:
docker compose ps
MongoDB is now running on localhost:27018
. Connect using root
/ example
or update credentials as needed.
- Python:
python3 --version
- Docker:
docker --version
- Docker Compose:
docker compose version
- Node:
node --version
- Yarn:
yarn --version
Confirm that all meet any minimum version requirements.
-
Python (Microsoft)
Provides language server support, debugging, linting, and IntelliSense for Python code. -
Django (optional but helpful)
Offers syntax highlighting and code snippets tailored for Django projects. -
ESLint (JavaScript/TypeScript linting)
Helps maintain consistent coding style and catches errors in JavaScript/TypeScript. -
Prettier (optional, for code formatting)
Automatically formats your code, keeping it clean and consistent. -
Docker
Allows you to visualize, manage, and interact with Docker containers and images directly in VSCode. -
(Optional) MongoDB for VSCode
Lets you connect to and browse your MongoDB databases, run queries, and view results without leaving VSCode.
- Edit the
hello_world
function inurls.py
(or your views). - Refresh your browser at http://127.0.0.1:8001/hello/.
This section explains how to create a Django endpoint that reads a name
parameter from the query string (e.g., /?name=Bob
).
Open your Django project’s urls.py
(or views.py
, depending on your structure). Below, we’ll define a function that looks for a name
query parameter in request.GET
:
# django_app/urls.py
from django.contrib import admin
from django.urls import path
from django.http import JsonResponse
def hello_name(request):
"""
A simple view that returns 'Hello, {name}' in JSON format.
Uses a query parameter named 'name'.
"""
# Get 'name' from the query string, default to 'World' if missing
name = request.GET.get("name", "World")
return JsonResponse({"message": f"Hello, {name}!"})
urlpatterns = [
path('admin/', admin.site.urls),
path('hello/', hello_name),
# Example usage: /hello/?name=Bob
# returns {"message": "Hello, Bob!"}
]
Activate your virtual environment (if not already active):
source venv/bin/activate # macOS/Linux
.\venv\Scripts\activate # Windows
Install dependencies (if you haven't):
cd backend # if you are not inside /backend already.
pip3 install -r requirements.txt
Navigate to your Django project folder (e.g., cd backend) and run the server on port 8001:
python manage.py runserver 8001
You should see:
Starting development server at http://127.0.0.1:8001/
Install a REST client like Postman (if you haven’t already).
Create a new GET request.
Enter the endpoint, for example:
http://127.0.0.1:8001/hello/?name=Bob
Send the request. You should see a JSON response:
{
"message": "Hello, Bob!"
}
- Stage and commit:
git add . git commit -m "Your descriptive commit message"
- Push to your forked repo (main branch by default):
git push origin main
cd backend
python manage.py test
docker compose ps
Note: This command displays the status of the containers, including whether they are running, their assigned ports, and their names, as defined in the docker-compose.yaml file. If you have set up a MongoDB server using Docker and connected it to your Django application, you can use this command to verify that the MongoDB container is running properly.
The frontend setup instructions are located in the frontend
directory. You don't need to set up the frontend until later parts of the course, but feel free to try it earlier and play around.
Head over to the frontend README to check it out: Frontend README
- Django: https://docs.djangoproject.com/en/3.2/
- React: https://react.dev/learn
- Create react app: https://create-react-app.dev/docs/getting-started
- MongoDB: https://docs.mongodb.com/
- Docker Compose: https://docs.docker.com/compose/
- You should commit settings.py so the Django configuration is shared.
- However, never commit secrets (API keys, passwords) directly. Use environment variables or .env files (excluded via .gitignore).