ya332 / crypto-squirrels-coding-club

Community of NFT-holder members to practice for coding interviews

Home Page:https://crypto-squirrels-coding-club.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crypto Squirrels Coding Club

Live at https://crypto-squirrels-coding-club.herokuapp.com
Mintbase Store: https://testnet.mintbase.io/store/cryptosquirrelsclub.mintspace2.testnet
Submission to NEAR MetaBUILD Hackathon by Yigit Alparslan, (Github handle ya332).
Contact info: alparslanyigitcan@gmail.com

Roadmap

  • Add Wallet login
  • Finalize landing page
  • Migrate CodeTernel code to this repo NEAR
  • Deploy NFT smart contract to testnet
  • Allow redirecting to The BACKYARD if the user is logged in and has NFT.
  • Create squirrel edition on Mintbase.io
  • Add steps to be a member

Some useful resources: https://github.com/near/corgis and https://mintbase-testnet.hasura.app/api/rest/stores/squirrelcodingclub.mintspace2.testnet

Quick Start

To run this project locally:

  1. Prerequisites: Make sure you have Node.js ≥ 12 installed (https://nodejs.org), then use it to install yarn: npm install --global yarn (or just npm i -g yarn)
  2. Run the local development server: yarn && yarn dev (see package.json for a full list of scripts you can run with yarn)

Now you'll have a local development environment backed by the NEAR TestNet! Running yarn dev will tell you the URL you can visit in your browser to see the app.

Exploring The Code

  1. The backend code lives in the /contract folder. This code gets deployed to the NEAR blockchain when you run yarn deploy:contract. This sort of code-that-runs-on-a-blockchain is called a "smart contract" – learn more about NEAR smart contracts.
  2. The frontend code lives in the /client folder.
  3. Tests: there are different kinds of tests for the frontend and backend. The backend code gets tested with the asp command for running the backend AssemblyScript tests, and jest for running frontend tests. You can run both of these at once with yarn test.

Both contract and client-side code will auto-reload as you change source files.

Deploy

Every smart contract in NEAR has its own associated account. When you run yarn dev, your smart contracts get deployed to the live NEAR TestNet with a throwaway account. When you're ready to make it permanent, here's how.

Step 0: Install near-cli

You need near-cli installed globally. Here's how:

npm install --global near-cli

This will give you the near CLI tool. Ensure that it's installed with:

near --version

Step 1: Create an account for the contract

Visit NEAR Wallet and make a new account. You'll be deploying these smart contracts to this new account.

Now authorize NEAR CLI for this new account, and follow the instructions it gives you:

near login

Step 2: set contract name in code

Modify the line in src/config.js that sets the account name of the contract. Set it to the account id you used above.

const CONTRACT_NAME = process.env.CONTRACT_NAME || 'your-account-here!'

Step 3: change remote URL if you cloned this repo

Unless you forked this repository you will need to change the remote URL to a repo that you have commit access to. This will allow auto deployment to GitHub Pages from the command line.

  1. go to GitHub and create a new repository for this project

  2. open your terminal and in the root of this project enter the following:

    $ git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git

Step 4: deploy!

One command:

yarn deploy

As you can see in package.json, this does two things:

  1. builds & deploys smart contracts to NEAR TestNet
  2. builds & deploys frontend code to Heroku using heroku-cli. Feel free to modify the deploy script in package.json to deploy elsewhere.

About

Community of NFT-holder members to practice for coding interviews

https://crypto-squirrels-coding-club.herokuapp.com

License:MIT License


Languages

Language:Rust 40.8%Language:TypeScript 35.7%Language:JavaScript 19.0%Language:SCSS 2.0%Language:Shell 2.0%Language:HTML 0.5%