This area of the documentation is intended for administrators of the project, including anyone who needs to run a local instance of the site.
This repo is currently deployed to Fleek on the following URLs:
main
branch: https://ecosystem.filecoin.io (production)develop
branch: https://fil-ecosystem-explorer.on.fleek.co (staging)
Pushes made to the main
or develop
branches of this repo will automatically be reflected in the URLs above. Allow 2-5 minutes for the application to rebuild before seeing changes in your browser.
It's recommended to use conventional commits in this project. However, to avoid confusion from users, they aren't strictly being enforced with pre-commit hooks. Still, it's advisable to use these prefixes for titling a commit:
feat:
A feature, or part of a featurefix:
A bug fixstyle:
A visual or stylistic change onlychore:
An operational task, such as routine maintenance, version control related operations, dependencies, etc.refactor:
A change to the way the code is implemented, without materially changing the featureperf:
A change that is made primarily to improve performancetest:
Any changes required to run a specific test or try out a behavior for the purposes of testingcleanup:
Markup and syntactic cleanup that doesn't affect the code outputdocs:
Documentation-related changescontent:
Changes to the project's content, such as copy or media
File names containing project content must be named after project names, and use lowercase and kebab-case. We call these slug
s.
For example, for a project called World Wide Web, an appropriate project slug
would be world-wide-web
, and therefore the corresponding file would be world-wide-web.json
. It's important to not deviate between the file name and the name
of the project.
The repo as a whole should require minimal maintenance and should remain stable over time without updates to the core codebase.
The one task that will require ongoing attention is reviewing and merging PRs submitted by the community. The following is a suggested process, or checklist to follow when reviewing additions or modifications to projects.
-
Check the PR's source: does the submitter appear to be valid? (i.e., verify that it's their project to edit)
-
Check to make sure the PR uses
main
as the base branch (this is the default and should always be the case) -
Ensure all checks have passed: the PR should have no failed checks
-
Open the build preview from the checks section of the PR, ensure their project looks correct and that all the links are valid
-
Check the
Files changed
tab and ensure the user has only changed appropriate projectjson
files withincontent/projects/
— no other files should have been modified -
Submit a review with any comments
-
Merge the PR into
main
Within a few minutes, the updated site will be visible on production.
The project is built and deployed as a static site and an SPA (single-page app). Despite being static, it invokes some application-like behavior.
- Uses a Vue framework, nuxtJS 2, deployed in static mode
- The site itself is served statically, but internal navigation is virtualized in the browser: in other words, the site acts as an SPA when browsed on the client
- Requires nodeJS and has been tested on node 16
- Styles are written in SCSS, and are concatenated and tree-shaken during compile-time
- The static site is deployed via Fleek, and is therefore available on IPFS using CID-based paths, or through many IPFS gateways
- Content is abstracted into
json
files, and should be managed by editing these files and creating pull requests
Running this project locally requires a few steps and dependencies.
First clone the repo to your local disk, and install all dependencies. The following are a sequence of
# Navigate to your desired local path
cd ~/Projects/
# Clone the repo
git clone [email protected]:filecoin-project/ecosystem-directory.git
# Enter the repo directory
cd ecosystem-directory
# Add your user information
git config user.name "Your Name"
git config user.email "[email protected]"
# Install npm dependencies
npm ci
In order to browse with TLS locally, you'll need a certificate. A self-signed certificate is satisfactory for this purpose. Here's how to set one up.
Generating a self-signed SSL certificate
Used for development in a local environment (such as on your personal computer). You only need to do this once. If you've already done this for a different project, just copy your existing localhost_cert.pem
and localhost_key.pem
files from ~/.ssh
into the root directory of this repo and skip the rest of this step.
- Install mkcert and generate certificate by running the commands below, in this order:
cd ~/.ssh brew install mkcert mkcert -install mkcert -key-file localhost_key.pem -cert-file localhost_cert.pem localhost 127.0.0.1 cat localhost_cert.pem > localhost_fullchain.pem cat "$(mkcert -CAROOT)/rootCA.pem" >> localhost_fullchain.pem
- Copy the new
localhost_cert.pem
andlocalhost_key.pem
files to the root directory of this repo
The above tutorial is specifically for MacOS machines with brew
installed. For other *nix OS's replace the installation step with your preferred package manager (e.g. apt install mkcert
).
In the repo root directory, create a .env
file and populate it with this content:
NODE_ENV=development
SERVER_ENV=development
This is suitable for local development. For deployements of the production site, both values should be production
instead.
You're all set. simply start the app by running
npm run dev
- If you ever need to rebuild dependencies, just run
npm ci
- The full build command for CIs is
npm ci && npm run generate
, but that isn't needed for local development
Please use npm ci
in place of npm i
when not explicitly upgrading depdendencies. npm ci
will only install versions of packages provided in the lockfile, leading to more stability.
Always regression test the site if upgrading packages, as they may contain breaking changes.
- File names should be in
kebab-case
- Component names, which are imported, should be
PascalCase
- The grid used is a flexbox style system called Gridlex, its documentation is also available as a readme in this repo
- Color name variables in
SCSS
are obtained from this resource
Ports
The following ports are used, depending on the environment.
development: 20000
stable: 20001
production: 20002
Mode: static
Environment Variables
NODE_ENV → development|production
SERVER_ENV → development|stable|production