Trello Alternative is an app inspired totally by Trello, contains multiple features:
- User authentication: Get a JSON Web Token, Refresh that token (Using cookies)
- Workspace creation: You can divide your work into pieces and create a workspace for each one, by default once you sign up, you will get your private Workspace.
- Board creation: As Trello, inside the workspace, you can define a board for a specific Project. For Example: Programming
- List creation: These are created inside the boards. For Example: List: "Personal Projects" inside PROGRAMMING Board
- Card creation: Cards exist inside Lists and these are the most important, because there you can upload attachments, add members, add tasks, and manage each project you have. For Example: Card "Trello Clone" inside PERSONAL PROJECTS List
- Attachments: This App was made to store information not locally, instead it is using Google Cloud Storage,so we don't have to worry about the space, but can have everything stored in the cloud
Important dependencies:
- @google-cloud/storage
- cookie-parser
- class-validator
- passport
- jsonwebtoken
- bcrypt
If you're planning to start a new project, then you can simply run:
npm i -g @nestjs/cli
nest new <Project-name>
To install the dependencies of this one and run the project
npm install
npm run start:dev
For more information, check NestJS documentation: https://docs.nestjs.com/
Note: as this is not running LIVE, you must create your OWN .env file to handle your environment variables.
DB_QUERY = Include your MongoDB Query String
ACCESS_TOKEN = This is a random string created
REFRESH_TOKEN = This is a random string created, not the same as ACCESS_TOKEN
ACCESS_TOKEN_DURATION = Duration of the AT, for example: 30s, 30m, 24h, 1d
REFRESH_TOKEN_DURATION = Duration of the RT, for example: 30s, 30m, 24h, 1d, MAKE SURE TO BE BIGGER THAN AT DURATION
The next 4 variables are obtained from Google Cloud Platform, KEEP THEM SECRET
PROJECT_ID = This is your project ID from GCP
CLIENT_EMAIL = Not your email address, but the email you specify in your project
BUCKET = The name of the bucket you created before
PRIVATE_KEY = This is the Private Key you receive when generating it, make sure to copy from -----BEGIN UNTIL END PRIVATE KEY-----\n
If you would like to know how to integrate GCP in the project
- Start a plan, go to Google Cloud Platform
- Create a Project with any name
- Once you create the project, navigate to IAM & Admin -> Admin, by default you will have a Principal with your email and name, click on the Pencil and add "Storage Admin", Owner should be already select
- Once the Role is added, navigate under the same IAM & Admin menu, to "Service Account"
-
Click on "Create Service Account" and enter all the info
It should look like this, then click on it
- Go to permissions and add "Cloud Run Service Agent" to the service account you just created
- Navigate to Keys, click on "Add Key", "Create New Key", "JSON"
-
A download should generate and should receive a file with the following sintax:
{ "type": "service_account", "project_id": "YOUR-PROJECT-ID", "private_key_id": "YOUR-PRIVATE-KEY_ID", "private_key": "-----BEGIN PRIVATE KEY-----YOUR-PRIVATE-KEY-----END PRIVATE KEY-----\n", "client_email": "YOUR-CLIENT-EMAIL", "client_id": "CLIENT-ID", "auth_uri": "", "token_uri": "", "auth_provider_x509_cert_url": "", "client_x509_cert_url": "", "universe_domain": "googleapis.com" }
- After all of this, then we need to create a BUCKET, this is where the info will be stored, Go to the main Menu -> Cloud Storage -> Bucket, under Configuration, you can change the permissions to "Fine-Grained"