An interview assignment for The Silver Logic that is similar to Facebook's wall, where users log in and may post on a 'global wall' that everyone can see.
- Python (3.8.10)
- Django (4.1.1)
- django-cors-headers
- django-environ
- Reactjs (18.2.0)
- axios
- react-router-dom
- SQLite3
Wall App allows users to register a new account, login, and post messages to a global wall that other users can see. Upon registering for a new account, a welcome email is send to the user. User auth and sessions are managed by Django convenience libraries. There are also several test suits that ensure all Django views behave as expected.
- download the project
- make sure you have python installed
- make sure you have a python virtual environment manager installed (something like pipenv)
The steps outlined below assume you're using npm, but most of the popular package managers should work.
- create a
.envfile in the/frontenddirectory and add the following:
REACT_APP_ENVIRONMENT=dev
cdinto the/frontendfolder- run
npm installto install the needed dependencies - run
npm run startto spin up the development server - open up a separate terminal for the backend setup
The steps outlined below assume you're using pipenv, but any python virtual environment manager should work.
- create a
.envfile in the project's root directory, and add the following:
# A secret used by Django when generating hashes
SECRET_KEY=REPLACE_THIS_WITH_A_SECRET_KEY
EMAIL_HOST=REPLACE_THIS_WITH_AN_EMAIL_HOST
EMAIL_HOST_USER=REPLACE_THIS_WITH_YOUR_EMAIL
EMAIL_HOST_PASSWORD=REPLACE_THIS_WITH_YOUR_EMAIL_PASSWORD
Here is the list of email hosts you can choose based on which one your email belongs to (e.g. Foo@outlook.com would choose smtp-mail.outlook.com for the EMAIL_HOST):
AOL aol.com smtp.aol.com
AT&T att.net smtp.mail.att.net
Comcast comcast.net smtp.comcast.net
iCloud icloud.com/mail smtp.mail.me.com
Gmail gmail.com smtp.gmail.com
Outlook outlook.com smtp-mail.outlook.com
Yahoo mail.yahoo.com smtp.mail.yahoo.com
cdinto the/backendfolder- enter the
pipenvshell usingsudo pipenv shell - install the project's backend dependencies using
pipenv install - run
python manage.py migrate - you can start the server by running the
python manage.py runservercommand
The view tests can be run by using python manage.py test.
For emails to be sent, you'll need to have an additional terminal instance open (besides the one for running the Django server). In that terminal, run python -m smtpd -n -c DebuggingServer localhost:25, ensuring you're still in the /backend directory.


