This NFT application uses a MongoDB container to support the platform.

Overview

NodeJS Typescript Fastify Template

Required [email protected]^14.0

Starting

  1. cp .env-example .env and fill necessary params
  2. npm install
  3. npm start

Development

Routes and Controllers

Set up routes at app/modules/routes/routes.ts importing the correct functions to the application. You should use Controllers at app/modules/controller to create database communication methods, and set up viewers at app/modules/routes/route-domain to instantiate and call controller's methods.

AbstractEntity

The AbstractEntity::class should be extended to every controller that will use database connection as it contains basic implementes methods that can be overridden.

import { AbstractEntity } from '@/abstract/AbstractEntity';
import { MyDataModel } from '@/interfaces/MyDataModel';

class MyController extends AbstractEntity {
 protected table = "MyTable";
 protected data: MyDataModel;
 
 constructor(data?: MyDataModel) {
     super();
     this.data = data;
 }

 async getCertainDocument(){
     const dbm = this.mongodb.connect();
     const collection = dbm.collection(this.table);
     const result = await collection.findAll();
     this.disconnect();
     return result;
 }

 async overrideFindOne(query: FilterQuery<any>, opts?: FindOneOptions<any>) {
     return await this.findOne(query, opts);
 }
 // ... other methods
}

CryptoJsHandler

CryptoJsHandler::class provides encryption and decryption methods. To start using, create a ssh key called crypto-js in app/.shh.

import { CryptoJsHandler } from '@/util/CryptoJSHandler';
 
 // Instantiates the handler
 const handler = new CryproJSHandler();
 
 // Encrypt some string
 const encrypted = handler.encrypt('MySensitiveData123');
 // encrypted = "e69b2774de366007b336f5cb0ea8ecb4336cbd69a4a5e6d4c7068fd59866a384"

 // Decript some string
 const decrypted = handler.decrypt(encrypted);
 // decrypted = "MySensitiveData123"
 

Documentation

Keep the documentation up to date before pushing up.

Services

Services are classes used to perform outside world communication such as any API, or external integration. The orientation of use will vary between Controllers and viewers, depending on what kind of job it will do. For example, if you need to proxy a request, use inside a viewer. If you need to check something while processing data, use inside a controller method.

Avoid using static methods and keep the single responsibility standard up to date. Use interfaces to better organize entities and control the data flow.

Deploy

Deploy this application using docker-compose up -d. This application uses a MongoDB container to support the platform.

You can use docker's mongodb container name as mongodb.host in environment file.

Before deploying, change docker-compose.yml with a secure username and password to mongodb and add it to the .env file.

Verify docker-compose's ports to avoid conflicts.

You might also like...

Script to fetch all NFT owners using moralis API. This script output is a data.txt file containing all owner addresses of a given NFT and their balances.

Script to fetch all NFT owners using moralis API. This script output is a data.txt file containing all owner addresses of a given NFT and their balances.

🔎 Moralis NFT Snapshot Moralis NFT API will only return 500 itens at a time when its is called. For that reason, a simple logic is needed to fetch al

Jun 23, 2022

An example of an NFT Gated Website for thirdweb's NFT Gated Website Guide

NFT Gated Website "One of the more dynamic use cases for NFTs is using them as a membership pass to the NFT holders. Let’s assume you want to create a

Nov 18, 2022

Create your own custom NFT minting page using thirdweb's NFT Drop contract

Customizable NFT Drop Minting Page In this example, you can create your own NFT Drop minting page just by customising the template with your branding,

Nov 14, 2022

This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 25, 2021

A container-friendly alternative to os.cpus().length. Both cgroups v1 and cgroups v2 are supported.

node-cpu-count A container-friendly alternative to os.cpus().length. Both cgroups v1 and cgroups v2 are supported. Installation $ npm install node-cpu

Jan 17, 2022

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions. (like child-processes, iframe, web worker etc).

Sep 9, 2022

Container Image Signing & Verifying on Ethereum [Testnet]

Container Image Signing & Verifying on Ethereum [Testnet]

cosigneth An experimental decentralized application for storing and verifying container image signatures as an NFT on Ethereum cosigneth, is a decentr

Jul 4, 2022

Mailbox is the predictable states & transitions container for actors.

Mailbox is the predictable states & transitions container for actors.

Mailbox (turns XState Machine into a REAL Actor) Mailbox is an NPM module built on top of the XState machine, by adding a message queue to the XState

Aug 24, 2022

ContainerMenu is an API for BDSX that allows you to create fake interactive container menus !

ContainerMenu is an API for BDSX that allows you to create fake interactive container menus !

ContainerMenu - A BDSX API ContainerMenu is an API for BDSX that allows you to create fake interactive container menus ! Features Multiple containers

Oct 28, 2022
Owner
Jeffery Kang
Passionate about Website Design and Logical optimization
Jeffery Kang
The app's backend is written in Python (Flask) and for search it uses Elasticsearch. I used this app as candidate application for learning out how to build, run and deploy a multi-container environment (docker-compose).

foodtrucks-app-docker-compose The app's backend is written in Python (Flask) and for search it uses Elasticsearch. I used this app as candidate applic

Selçuk Şan 3 Oct 24, 2022
🐲 Epic NFTs [UI] - Proyecto que te permitirá conectar tu billetera y acuñar un NFT, podrás revender el NFT en OpenSea. El NFT en sí se puede personalizar

?? Epic NFTs [UI] El proyecto se encuentra deployado en Vercel para que puedan verlo e interactuar con él, toda crítica o comentario se agradece, pued

Braian D. Vaylet 17 Oct 22, 2022
Fullstack Dynamic NFT Mini Game built using 💎 Diamond Standard [EIP 2535] 🏃‍♀️Players can use Hero NFT to battle against Thanos ⚔ Heroes can be Healed by staking their NFT 🛡

?? Fullstack Dynamic NFT Mini Game ?? ?? Using Diamond Standard Play On ?? ?? ⏩ http://diamond-dapp.vercel.app/ Project Description ?? Fullstack Dynam

Shiva Shanmuganathan 16 Oct 24, 2022
NFT Marketplace framework to build standalone NFT marketplace or inApp/inGame NFT marketplace

NFT Marketplace This project is a decentalized NFT Marketplace framework which is to be the baseline for you to build standalone NFT marketplace or in

Reddio, inc. 10 Nov 24, 2022
Query for CSS brower support data, combined from caniuse and MDN, including version support started and global support percentages.

css-browser-support Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentage

Stephanie Eckles 65 Nov 2, 2022
A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integration.

MongoDB Starter – Developer Directory A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integrati

Vercel 230 Nov 28, 2022
Mongo Strict is a TypeScript based smart MongoDB ORM, It makes the usage of MongoDB safer, easier and faster with a better performance...

mongo-strict mongo-strict is compatible with mongo >= 5 Mongo Strict is a TypeScript-based smart MongoDB ORM, It makes the usage of MongoDB safer, eas

Mohamed Kamel 4 Sep 22, 2022
NFT Game Starter Project: https://github.com/buildspace/buildspace-nft-game-starter

Running React on Repl.it React is a popular JavaScript library for building user interfaces. Vite is a blazing fast frontend build tool that includes

Zahuis 2 Feb 11, 2022
Dead simple program to upload NFT data to IPFS via nft.storage

NFTP The simplest way to publish files and folders to IPFS, with one command. 100% FREE to upload as much files as you want, powered by nft.storage. N

factoria 33 Nov 19, 2022
Candy Shop is a JavaScript library that allows DAOs, NFT projects and anyone to create an NFT marketplace on Solana in minutes!

Candy Shop (IN BETA) Intro Candy Shop is a JavaScript library that allows DAOs, NFT projects and anyone to create an NFT marketplace on Solana in minu

LIQNFT 101 Nov 20, 2022