DailyDoer

Take control of your day with DailyDoer! This powerful to-do app helps you stay organized and focused, so you can get more done in less time. With features like task prioritization, due date reminders, and syncing across devices, DailyDoer makes it easy to manage your tasks and stay on track. Download it now and start achieving your goals one task at a time!

Description

This project is a to-do app built using Node.js with Express as the backend framework and Angular as the frontend framework. The app uses Postgres as the database and Prisma as the ORM. Additionally, it integrates with Google Cloud Translation API to provide multi-language support.

Technologies Used

  • Node.js with Express
  • Postgres
  • Prisma as ORM
  • Angular
  • Google Cloud Translation API

Installation

To install and run this project, follow these steps:

  1. Clone this repository to your local machine.
  2. Install Node.js and NPM on your machine.
  3. Install the project dependencies by running the command npm install.
  4. Set up a Postgres database and update the connection string in the .env file.
  5. Run the database migrations by running the command npx prisma migrate dev.
  6. Start the backend server by running the command npm run dev.
  7. Start the frontend server by running the command npm start.
  8. Open your web browser and navigate to http://localhost:{PORT} to view the app.

List of target translation languages short code:

- fa = Persian
- ru = Russian
- es = Spanish
- ar = Arabic
- en = English
- zh = Chinese
- hi = Hindi
- fr = French

These Short code can be used for requesting google cloud translation api for translating any text in the languages specified above. Source

Usage

  • TODO

Deploying Client and Server Applications on Google Cloud Platform

Client Application

  1. Install the Google Cloud SDK and initialize your project.
  2. Build your Angular application using the ng build command. This will generate the dist directory containing the static files that need to be served.
  3. Create a file named client.yaml in the root directory of your project and paste the following YAML code:
runtime: python27
api_version: '1'
threadsafe: true
service: client
handlers:
  - url: /(.+\.(ico|jpg|png|gif|svg|js|css))$
    static_files: dist/\1
    upload: dist/(.+)\.(.+)$

  - url: /(.*)
    static_files: dist/index.html
    upload: dist/index.html

  - url: /
    static_dir: dist/
  1. Replace the dist directory path with the path of the directory generated by the ng build command if it is different from dist.
  2. Deploy your client application to Google Cloud App Engine by running the following command:
gcloud app deploy client.yaml

Server Application

  1. Install the Google Cloud SDK and initialize your project.
  2. Create a file named app.yaml in the root directory of your server application and paste the following YAML code:
runtime: nodejs14
instance_class: F1
service: default
automatic_scaling:
  max_instances: 1
handlers:
  - url: .*
    script: auto
env_variables:
  DATABASE_URL: "postgresql://<USERNAME>:<PASSWORD>@localhost:5432/DBNAME?schema=public&host=/cloudsql/<CLOUD SQL INSTANCE NAME"
  JWT_ACCESS_SECRET: <SECRET>
  JWT_REFRESH_SECRET: <Another-SECRET>

here is the package.json scripts

 "scripts": {
    "dev": "nodemon src/server.ts",
    "start": "node ./dist/server.js",
    "build": "tsc",
    "gcp-build": "tsc -p ."
  },
  1. Replace the environment variable values with your server application's environment variable values.
  2. Deploy your server application to Google Cloud App Engine by running the following command:
gcloud app deploy app.yaml

That's it! Your client and server applications are now deployed on Google Cloud Platform.

License

This project is licensed under the MIT License.