TaskHola is a simple task manager mobile application built with the Django REST Framework and Expo React Native framework. It allows users to create, retrieve, update, and delete tasks. The application is built using the following technologies:
Docker for containerization
PostgreSQL as the database
Django REST Framework for the backend RESTful API
Expo with React Native for a cross-platform mobile app
Grafana for monitoring and database management
- Docker and Docker Compose
- Node.js and npm
- Expo CLI
- EAS CLI
- iOS Simulator or Android Emulator
-
Clone the repository:
git clone https://github.com/perfettiful/TaskHola.git
cd TaskHola/taskhola-mobile -
Install dependencies:
npm install
-
Install EAS CLI:
npm install -g eas-cli
-
Configure EAS:
eas build:configure
-
Run the app:
npm run start:dev
-
Run tests:
npm run test -
Create a Production Build:
npm run build
-
Navigate to the backend directory:
cd TaskHola/taskhola-backend -
Copy the example environment file:
cp .env.example .env
-
Fill in Desired Credentials for .ENV Variables:
PROJECT_NAME= GRAFANA_CONTAINER_NAME= GRAFANA_PORT=3000 GF_SECURITY_ADMIN_USER= GF_SECURITY_ADMIN_PASSWORD= POSTGRES_CONTAINER_NAME= POSTGRES_PORT=5432 POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_DB=tasks_db
-
Build and run the Docker container:
docker-compose up --build
-
Access the Django API:
- The Django Admin panel will be available at
http://localhost:8000/admin- Username: set in .env file
- Password: set in .env file
- The REST API docs will be available at
http://localhost:8000/api/tasks
- The Django Admin panel will be available at
-
To access Grafana locally, open your web browser and navigate to:
http://localhost:3000 -
The default login credentials are:
- Username: set in .env file
- Password: set in .env file
-
Login and Configure Expo Account on Expo
-
Generaate a Production Build:
- Run
npm run buildto create a production build
-
Ensure you have your environment variables set for production.
deploy-exp.ymlworkflow uses SSH for deployment, ensure you have the following secrests set in your Github repository:EXPO_TOKEN
-
Deploy the Production Build:
- Deploy on trigger using
deploy-exp.ymlworkflow
- Deploy on trigger using
-
Access the Production Build in Expo Dashboard:
-
Provision your choice of Virtual Private Server (VPS)
- I recommend Ubuntu on AWS EC2
-
Configure Firewall and Security Groups for SSH and HTTP/HTTPS
-
Ensure you have your environment variables set for production.
deploy-api.ymlworkflow uses SSH for deployment, ensure you have the following secrests set in your Github repository:SERVER_HOSTSERVER_USERSERVER_PASS
-
Use a reverse proxy (like Caddy or Nginx) to serve your application.
- See example Caddyfile in
./caddy
monitor.taskhola.app { reverse_proxy grafana:3000 } api.taskhola.app { reverse_proxy web:8000 } - See example Caddyfile in
-
Build the Docker images for production on Github Actiuon Trigger:
deploy-api.yml -
Configure DNS recordss for your domain/ subdomains:
- See the Live TaskHola API Docs: https://api.taskhola.app/api/tasks
- See the Live Grafana Dashboard: https://monitor.taskhola.app
- Username: taskholatest
- Password: taskholatest
- Find me online: https://nathanperfetti.dev
- Find me on Github: @perfettiful
- Find me on LinkedIn: @nathanperfetti
- Find me on Youtube: @nathan_codes
