{"id":20913810,"url":"https://github.com/satt-wallet/backend","last_synced_at":"2025-05-13T09:31:24.589Z","repository":{"id":43189228,"uuid":"469660498","full_name":"SaTT-Wallet/Backend","owner":"SaTT-Wallet","description":"This backend provides webservice to SaTT Token WebWallet and advertising campaign manager","archived":false,"fork":false,"pushed_at":"2024-04-22T17:18:43.000Z","size":47792,"stargazers_count":30,"open_issues_count":29,"forks_count":13,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-25T17:59:37.366Z","etag":null,"topics":["angular","express","expressjs","nodejs","web3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaTT-Wallet.png","metadata":{"files":{"readme":"README.md","changelog":"changepackage.js","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-14T09:19:34.000Z","updated_at":"2024-04-22T17:18:47.000Z","dependencies_parsed_at":"2023-12-27T11:48:04.712Z","dependency_job_id":"2c881c57-04cf-4eda-bafe-09863f8b7ec1","html_url":"https://github.com/SaTT-Wallet/Backend","commit_stats":{"total_commits":2999,"total_committers":30,"mean_commits":99.96666666666667,"dds":0.7532510836945648,"last_synced_commit":"d0b2c2201463c6673cb5554833dea97a550aee17"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaTT-Wallet%2FBackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaTT-Wallet%2FBackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaTT-Wallet%2FBackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaTT-Wallet%2FBackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaTT-Wallet","download_url":"https://codeload.github.com/SaTT-Wallet/Backend/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913062,"owners_count":21983249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","express","expressjs","nodejs","web3"],"created_at":"2024-11-18T15:08:03.970Z","updated_at":"2025-05-13T09:31:24.575Z","avatar_url":"https://github.com/SaTT-Wallet.png","language":"JavaScript","readme":"# SaTT Wallet 🚀💼\n\nWelcome to SaTT Wallet, a cutting-edge project in the realm of smart advertising. Our wallet leverages blockchain technology to offer a unique approach to managing and transacting with the Smart Advertising Transaction Token (SaTT). 🌐💰\n\n## Project Overview 📚\n\nOur project is composed of two main repositories:\n\n1. **Backend** 🖥️: This part of the project provides the webservice for the SaTT Token WebWallet and the advertising campaign manager. It's primarily written in JavaScript.\n\n2. **Frontend** 🎨: The frontend of the SaTT wallet is built using Angular, a robust framework in the TypeScript ecosystem.\n\n## How to Contribute 💪🔧\n\nWe welcome developers who are passionate about decentralized technology, advertising, and improving user experience.\n\nTo contribute:\n\n1. Fork the repository you wish to contribute to (Backend or Frontend). 🍴\n2. Create a new branch for your feature. 🌿\n3. Make your changes and commit them with clear, concise messages. 📝\n4. Push your changes to your branch. 🚀\n5. Create a pull request. 🙏\n\nWe strongly encourage contributors to adhere to best coding practices, which include:\n\n- Write clean, readable, and maintainable code. 🧹✨\n- Use meaningful naming for variables, functions, classes, and modules. 🏷️\n- Comment your code where necessary but strive to make your code as self-explanatory as possible. 🗂️\n- Avoid large commits that make the code review process more difficult. Break your work into small, individual commits each with a specific purpose. 🧩\n- Update and write tests when contributing to code. 🧪\n\n## Get in Touch 📞📧\n\nIf you have any questions or suggestions, please reach out to us at contact@satt-token.com. You can also follow our updates on Twitter at [@SaTT_Token](https://twitter.com/SaTT_Token).\n\nHappy coding! 🎉👩‍💻👨‍💻\n\n### Built With\n\nThis project is build in JavaScript for NodeJS and these main npm modules :\n\n-   [Express](https://expressjs.com/)\n-   [Mongodb](https://github.com/mongodb/node-mongodb-native)\n-   [Web3.js](https://web3js.readthedocs.io/en/v1.3.0/)\n-   [Passport.js](http://www.passportjs.org/)\n-   [bn.js](https://github.com/indutny/bn.js/)\n\n\u003c!-- GETTING STARTED --\u003e\n\n### Blockchain deployment\n\n1. You can check all our different smart contracts in contract folder:\n\n![alt text](/public/contracts.png)\n\n2. To Deploy smart contracts (token, campaign and oracle) in contract folder with [Remix](https://remix.ethereum.org) and [Metamask](https://metamask.io/) or [MEW](https://www.myetherwallet.com/):\n\n\\*\\*create your file on Remix and paste your code there\n\n![alt text](/public/remix.png)\n\n\\*\\*Compile your file.sol and check\n\n![alt text](/public/compile.png)\n\n\\*\\*To deploy your smart contract you should connect with your metamask account\n\n![alt text](/public/deploy.png)\n\n3. To create node, Web3 service provider with [Geth](https://geth.ethereum.org/),[openethereum](https://github.com/openethereum/openethereum) or [Infura](https://infura.io/) SaaS\n\n\\*\\*Create new Ethereum app\n\n![alt text](/public/createinfura.png)\n\n\\*\\*Get node credentials from infura such as PROJECTID, PROJECT SECRET, and the endpoints that we can use to connect to infura node(https, wss)\n\n![alt text](/public/keysinfura.png)\n\n```sh\nWEB3_URL=process.env.WEB3_URL\n```\n\nYou can also install Geth Node you can follow this [Guide](https://geth.ethereum.org/docs/getting-started) or [Parity](https://openethereum.github.io/Setup)\n\n4. on campaign contract call modToken(\u003ctoken_address\u003e,true)\n5. on campaign contract call setOracle(\u003coracle_address\u003e)\n6. on oracle contract call changeAsk(\u003ccampaign_address\u003e,true)\n\n## Getting Started\n\nTo run SaTT API webservice Provider you will need NodeJS 14.0+ and npm Package manager\n\n### Prerequisites\n\nFor development, you will only need Node.js and a node global package.\n\n### Node\n\n-   #### Node installation on Windows\n\n    Just go on [official Node.js website](https://nodejs.org/) and download the installer.\n    Also, be sure to have `git` available in your PATH, `npm` might need it (You can find git [here](https://git-scm.com/)).\n\n-   #### Node installation on Ubuntu\n\n    You can install nodejs and npm easily with apt install, just run the following commands.\n\n        $ sudo apt install nodejs\n        $ sudo apt install npm\n\n    node --version\n    up to v14.x.x\n\n    npm --version\n    up to 6.x.x\n\n    If the installation was successful, you should be able to run the following command.\n    PM2 Process Manager, you can install it as described below :\n\n    ```sh\n    npm install pm2 -g\n    ```\n\n### Installation\n\n1. Clone the repo\n    ```sh\n    git clone https://github.com/Atayen/node-satt.git\n    ```\n2. ```sh\n   cd \u003cproject_name\u003e\n   npm install\n   ```\n\n````\n\n3. Edit .env file with the right properties\n\n\n4. Register and start PM2 service or install nodemon\n```sh\npm2 start app.js\n````\n\nor\n\n```sh\nnpm start\n```\n\nor\n\n```sh\nnodemon\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\nAfter you run the project, you can navigate to [https://localhost:3015/docs](http://localhost:3015/docs) to see the full list of available endpoints.\n\n## Project Structure\n\nThe folder structure of this app is explained below:\n\n| Name             | Description                                                                                     |\n| ---------------- | ----------------------------------------------------------------------------------------------- |\n| **node_modules** | Contains all npm dependencies                                                                   |\n| **helpers**      | Contains all requirements and the cron job actions                                              |\n| **manager**      | Contains all the definitions of oracles                                                         |\n| **conf**         | Contains all configuration for the blockChain part.                                             |\n| **controllers**  | Controllers define functions to serve various express routes.                                   |\n| **routes**       | Contain all express routes, separated by module/area of application .                           |\n| **middlewares**  | Express middlewares which process the incoming requests before handling them down to the routes |\n| **routes**       | Contain all express routes, separated by module/area of application                             |\n| app.js           | Entry point to express app                                                                      |\n| package.json     | Contains npm dependencies as well as the scripts                                                |\n|                  |\n\n# Swagger\n\n## Specification\n\nThe swagger specification file is named as swagger.yaml. The file is located under definition folder.\nExample:\n\n```\npaths:\n  /hello:\n    get:\n      x-swagger-router-controller: helloWorldRoute\n      operationId: helloWorldGet\n      tags:\n        - /hello\n      description: \u003e-\n        Returns the current weather for the requested location using the\n        requested unit.\n      parameters:\n        - name: greeting\n          in: query\n          description: Name of greeting\n          required: true\n          type: string\n      responses:\n        '200':\n          description: Successful request.\n          schema:\n            $ref: '#/definitions/Hello'\n        default:\n          description: Invalid request.\n          schema:\n            $ref: '#/definitions/Error'\ndefinitions:\n  Hello:\n    properties:\n      msg:\n        type: string\n    required:\n      - msg\n  Error:\n    properties:\n      message:\n        type: string\n    required:\n      - message\n```\n\n### Highlights of the swagger.yaml File\n\n-   /hello:\n\n    Specifies how users should be routed when they make a request to this endpoint.\n\n-   x-swagger-router-controller: helloWorldRoute\n\n    Specifies which code file acts as the controller for this endpoint.\n\n-   get:\n\n    Specifies the method being requested (GET, PUT, POST, etc.).\n\n-   operationId: hello\n\n    Specifies the direct method to invoke for this endpoint within the controller/router\n\n-   parameters:\n\n    This section defines the parameters of your endpoint. They can be defined as path, query, header, formData, or body.\n\n-   definitions:\n    This section defines the structure of objects used in responses or as parameters.\n\n## Swagger Middleware\n\nThe project is using npm module `swagger-tools` that provides middleware functions for metadata, security, validation and routing, and bundles Swagger UI into Express.\n\n\u003c!-- Project Structure --\u003e\n\n\u003c!-- ROADMAP --\u003e\n\n## Roadmap\n\nSee the [open issues](https://github.com/Atayen/node-satt/issues) for a list of proposed features (and known issues).\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n### Social networks\n\n-   #### Facebook configuration\n\n    To create a Facebook app you should visit [official developer.facebook.com website](https://developers.facebook.com/apps/) and respect the following steps:\n\n    # Create an app\n\n![alt text](/public/1.png)\n\n# Confirm app creation\n\n![alt text](/public/2.png)\n\n# Get Facebook credentials\n\n![alt text](/public/3.png)\n\n# Get Facebook version\n\n![alt text](/public/4.png)\n\nPS:\nAll these credentials refer to APPID,APP_SECRET,FB_GRAPH_VERSION in .env file\n\n```sh\nAPPID=process.env.APPID\nAPP_SECRET=process.env.APP_SECRET\nFB_GRAPH_VERSION=process.env.FB_GRAPH_VERSION\n```\n\n-   #### Google configuration\n\n    To create a google app you should visit [official console.developers.google.com website](https://console.developers.google.com/) and respect the following steps:\n\n    # Create Credentials\n\n![alt text](/public/11.png)\n\n# Fill out the form\n\n![alt text](/public/22.png)\n\n# Get Client credentials\n\n![alt text](/public/33.png)\n\n# Create Youtube configuration\n\n![alt text](/public/111.png)\n\n# Get Youtube configuration\n\n![alt text](/public/222.png)\n\nPS:\nAll this credentials refers to GOOGLE_CLIENTID,GOOGLE_CLIENT_SECRET and GDA_TAP_API_KEY in .env file\n\n```sh\nGOOGLE_CLIENTID=process.env.GOOGLE_CLIENTID\nGOOGLE_CLIENT_SECRET=process.env.GOOGLE_CLIENT_SECRET\nGDA_TAP_API_KEY= process.env.GDA_TAP_API_KEY\n```\n\n-   #### LinkedIn configuration\n\n    To create a linkedin app you should visit [official developer.linkedin.com website](https://developer.linkedin.com/) and respect the following steps:\n\n    # Create a new app\n\n![alt text](/public/333.png)\n\n# Get linkedin crededentials\n\n![alt text](/public/444.png)\n\nPS:\nAll these credentials refer to LINKEDIN_KEY and LINKEDIN_SECRET in .env file\n\n```sh\nLINKEDIN_KEY=process.env.LINKEDIN_KEY\nLINKEDIN_SECRET=process.env.LINKEDIN_SECRET\n```\n\n-   #### Twitter configuration\n\n    To create a linkedin app you should visit [official developers.twitter.com website](https://developer.twitter.com/) and respect the following steps:\n\n    # Create a new app\n\n![alt text](/public/1t.png)\n\n# Set params for your app\n\n![alt text](/public/2t.png)\n\n# Get your twitter credentials\n\n![alt text](/public/3t.png)\n\n# Get your twitter credentials\n\nyou can regenerate again your credentials with more options\n\n![alt text](/public/4t.png)\n\nPS:\nAll this credentials refers to TWITTER_CONSUMER_KEY_ALT, TWILTTER_CONSUMER_SECRET_ALT,TWITTER_CONSUMER_SECRET_DEV,TWITTER_CONSUMER_KEY\nTWITTER_CONSUMER_SECRET,TWITTER_ACCESS_TOKEN_KEY and TWITTER_ACCESS_TOKEN_SECRET in .env file\n\n```sh\nTWITTER_CONSUMER_KEY_ALT=process.env.TWITTER_CONSUMER_KEY_ALT\nTWILTTER_CONSUMER_SECRET_ALT=process.env.TWILTTER_CONSUMER_SECRET_ALT\nTWITTER_CONSUMER_SECRET_DEV=process.env.TWITTER_CONSUMER_SECRET_DEV\nTWITTER_CONSUMER_KEY=process.env.TWITTER_CONSUMER_KEY\nTWITTER_CONSUMER_SECRET=process.env.TWITTER_CONSUMER_SECRET\nTWITTER_ACCESS_TOKEN_KEY=process.env.TWITTER_ACCESS_TOKEN_KEY\nTWITTER_ACCESS_TOKEN_SECRET=process.env.TWITTER_ACCESS_TOKEN_SECRET\n```\n\n-   #### Telegram configuration\n\n    To create a Telegram bot you should set it via mobile Telegram application:\n\n    # BotFather\n\n![alt text](/public/bot1.png)\n\n# Get your confirmation\n\n![alt text](/public/bot2.png)\n\nPS:\nThis credential refers to TELEGRAM_BOT_TOKEN in .env file\n\n```sh\nTELEGRAM_BOT_TOKEN=process.env.TELEGRAM_BOT_TOKEN\n\n```\n\n-   #### CoinMarketCap\n\nWe get data referred to Satt token from [official coinmarketcap.com/api website](https://coinmarketcap.com/api/) and respect the following steps:\n\n# Create your account\n\n![alt text](/public/marketcap0.png)\n\n# Get your credentials\n\n![alt text](/public/marketcap1.png)\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nFor more information don't hesitate to contact us by email to dev@atayen.us\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatt-wallet%2Fbackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatt-wallet%2Fbackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatt-wallet%2Fbackend/lists"}