Spect is a playground of coordination tools for DAO contributors to manage projects and fund each other.
Spect makes use of the following technologies on the backend:
- NestJS
- TypeScript
- MongoDB
- Mongoose
- Ethers js
- Alchemy
We’d need the following software to run the project locally, some of which you may already have;
Node
MongoDB
To install MongoDB, visit https://www.mongodb.com/docs/manual/administration/install-community/ and get setup.
To install Node, visit https://nodejs.org, download and install the setup file.
Upon installation, confirm that you have it installed by entering the following command in your terminal:
node -v
You should get some numbers to indicate what version you have installed.
If you do not receive those numbers, try running the installation again.
Spin up your terminal, navigate to the folder where you’d like the project repo to be stored, and run the following commands
git clone https://github.com/spect-ai/api.v1
This should clone the project repository to your local machine, where you can run and test locally.
Upon successful cloning of the repository, spin up your terminal and navigate to the project folder.
If you do not have yarn installed, visit https://yarnpkg.com/getting-started/install and follow the instructions to install.
Run the following command in the project repository
yarn install
This should install all the required dependencies to successfully run the project locally.
In order to run the project successfully, you’d need the environmental variables, setup in the .env file.
In your .env file, we’d define three variables;
HOST
PORT : Your API would be served to this
MONGODB_URI
HOST=0.0.0.0
PORT=8080
MONGODB_URI
With Mongo installed and started, you can connect to the Mongo instance from the URI you’ve set up in your .env file.
This should sync when you run the project repo.
With the dependencies installed, and your environment variables all defined, run the following command.
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
This should serve the project on localhost, to the port you have defined in your .env; in our case, 8080.
To run the defined tests, you can run the required command from the following set:
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
If the commit reverts a previous commit, it should begin with revert:, followed by the header of the reverted commit. In the body it should say: This reverts commit ., where the hash is the SHA of the commit being reverted.
Must be one of the following: feat: A new feature
fix: A bug fix
docs: Documentation only changes
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding missing tests
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
For a commit which should state that updates where made to the circles endpoint, the commit message would be modelled like this:
chore: updates to the circles endpoint