A digital time capsule webapp.
https://timecapsulator.herokuapp.com/home/
Note - Since this demo is deployed to heroku (free pack), it lacks some core functionalities:
celeryis not running.- The uploaded images can't be served back.
- Backend
- Django (The web framework)
- Django REST Framework (API toolkit - For usage with React)
- Celery (Async Task Queue - Used to send emails and manage background tasks)
- Google API Python client (For authentication)
- PostgreSQL (The used database in production)
- Frontend
- React (Building UI components)
- Redux Toolkit (For state management & storing API data)
- Tailwind CSS (For styling the React components)
After cloning the repo, go to the backend/ directory and create a new python virtual environment:
cd backend/
python -m venv venv
source venv/bin/activateThen install the requirements.txt:
pip install -r requirements.txtAssuming you have created a Google OAuth 2.0 client & got a Gmail account ready (for sending the emails) the next step would be creating the .env file:
cd conf
touch .envThen adding the OAuth 2.0 credentials & Gmail info in it:
# backend/conf/.env
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY="[your client id]"
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET="[your client secret]"
EMAIL_HOST_USER="[your gmail email address]"
EMAIL_HOST_PASSWORD="[your gmail app password or account password]"Install and run the redis server (the Celery broker)
sudo pacman -S redis
redis-serverRun the Celery worker
celery -A conf worker -l info
Now you can successfully migrate and run the django server:
python manage.py makemigrations
python manage.py migrate
python manage.py runserverGo to the frontend root directory and install the needed packages:
cd frontend/capsulator/
npm installFinally, you can now use the app:
npm start