Giter Site home page Giter Site logo

calendly / buzzwordcrm Goto Github PK

View Code? Open in Web Editor NEW
83.0 43.0 53.0 640 KB

BuzzwordCRM is a sample application that demonstrates how to build applications using Calendly's v2 api.

License: MIT License

JavaScript 77.40% CSS 21.16% Handlebars 0.81% Dockerfile 0.62%

buzzwordcrm's Introduction

BuzzwordCRM

BuzzwordCRM is a sample application that demonstrates how to build applications using Calendly's v2 api.

Running the app locally

  1. Register as a Calendly developer (if you haven't already) by logging into your Calendly account and Create a developer account (note: this app assumes that your redirect uri will be http://localhost:3000/oauth/callback).

  2. Once you've received your Client ID and Client Secret you can then copy .env.example to .env and update the file's environment variables with your application's credentials. You can update the redirect URL in this file as well.

    cp .env.example .env
  3. Run npm install to install dependencies.

  4. Run npm run dev to start the application.

  5. Navigate to http://localhost:3000.

Tests

BuzzwordCRM is equipped with integration tests, built with Cypress. To run tests locally you can run npm run test, this starts a test server and then opens the Cypress runner.

buzzwordcrm's People

Contributors

cliftonfowler avatar dependabot[bot] avatar kbryancalendly avatar maxt95 avatar msteadmancl avatar rsalaam avatar tcampb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buzzwordcrm's Issues

npm install error

getting npm install error i also checked my node version it is 14 but then also getting error.can anyone please help with solving this issue?

npm WARN tarball tarball data for combined-stream@https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz (sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for combined-stream@https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz (sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==) seems to be corrupted. Trying again.
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\akhil\AppData\Local\npm-cache_cacache\content-v2\sha512\15\03\783117ee25e1dfedc05b04c2455e12920eafb690002b06599106f72f144e410751d9297b5214048385d973f73398c3187c943767be630e7bffb971da0476
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\akhil\AppData\Local\npm-cache_cacache\content-v2\sha512\15\03\783117ee25e1dfedc05b04c2455e12920eafb690002b06599106f72f144e410751d9297b5214048385d973f73398c3187c943767be630e7bffb971da0476'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Calendly API Dev version

Wondering if Calendly has a DEV version of the API that we can test/call during our development.

We are using the Webhooks to post meeting information to an external application
We have a DEV UAT AND PROD version of our application.

However, when we create/register a separate webhook with a callback URL pointing to our 3 ENVs, the webhook push happens to all 3 environments.
If we just register 1 hook for PROD, we are unable to test on our DEV/TEST environments. We are having to delete our DEV/UAT webhooks so that PROD meetings dont get pushed to our DEV/UAT envs.
Then when we need to "debug" / develop new features, we have to create the webhooks pointing to our DEV/UAT envs again.

Is there a DEV API that we can explicitly test against instead of the "PROD" / "LIVE" API ie https://api.calendly.com/

After cloning and updatin the clinetid not able to run npm start giving this error

[email protected] start C:\Personal\hn\buzzwordcrm
node app.js

C:\Personal\hn\buzzwordcrm\node_modules\passport-oauth2\lib\strategy.js:86
if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); }
^

TypeError: OAuth2Strategy requires a clientID option
at new OAuth2Strategy (C:\Personal\hn\buzzwordcrm\node_modules\passport-oauth2\lib\strategy.js:86:34)
at Object. (C:\Personal\hn\buzzwordcrm\calendlyOauth2Strategy\index.js:11:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Personal\hn\buzzwordcrm\app.js:38:14)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ChandramouliKamsali(\AppData\Roaming\npm-cache_logs\2021-04-30T07_44_09_940Z-debug.log
Capture

Unable to login correctly

I have not been able to get the app running properly. When I authenticate with Calendly, it redirects me back to the index/home URL, but from there nothing happens.

The req.user in this /authenticate endpoint is null and so, its impossible for me to authenticate properly. Does this app work for others? Am I the only person facing this issue...?

routes/api.js @ line 113

  .get('/authenticate', async (req, res) => {
    let user;

    if (req.user) {
      user = await User.findById(req.user.id);
    }

    res.json({ authenticated: !!user });
  })

npm install not working

Here are the logs

Please delete or archive repositories that are not actively maintained.

npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/Users/adrian/.nvm/versions/node/v16.10.0/bin/node /Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | arm64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-darwin-arm64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-darwin-arm64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-darwin-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-darwin-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.5 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
npm ERR! (node:98779) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/adrian/Library/Caches/node-gyp/16.10.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/adrian/Library/Caches/node-gyp/16.10.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/adrian/Library/Caches/node-gyp/16.10.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR!     sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR!     return gyp_main(args)
npm ERR!            ^^^^^^^^^^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 629, in gyp_main
npm ERR!     [generator, flat_list, targets, data] = Load(
npm ERR!                                             ^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 150, in Load
npm ERR!     result = gyp.input.Load(
npm ERR!              ^^^^^^^^^^^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 3021, in Load
npm ERR!     LoadTargetBuildFile(
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 411, in LoadTargetBuildFile
npm ERR!     build_file_data = LoadOneBuildFile(
npm ERR!                       ^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
npm ERR!     build_file_contents = open(build_file_path, "rU").read()
npm ERR!                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 23.2.0
npm ERR! gyp ERR! command "/Users/adrian/.nvm/versions/node/v16.10.0/bin/node" "/Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.10.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/adrian/.nvm/versions/node/v16.10.0/bin/node /Users/adrian/.nvm/versions/node/v16.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/adrian/Documents/code/buzzwordcrm/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Darwin 23.2.0
npm ERR! node-pre-gyp ERR! command "/Users/adrian/.nvm/versions/node/v16.10.0/bin/node" "/Users/adrian/Documents/code/buzzwordcrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/adrian/Documents/code/buzzwordcrm/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.10.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/adrian/.npm/_logs/2024-03-27T21_44_47_740Z-debug.log

Test suite incorrectly reports a failure on clean run

When I run Cypress without first having ran the app, I get a test failure caused by a SyntaxError. However, if I then run the app for the first time, then re-run the test suite, that error is gone and the suite is now green. See the attached screenshots.

After running the app and the tests are green there are no noticeable file changes that would explain this behavior. Also I don't even have to load the app in the browser, I just run npm run dev then kill the process and re-run the test and then it passes.

I am able to reproduce this locally by cloning, deleting the repo and cloning again. I tried updating to [email protected] to see if that would take care of the problem but it didn't.

Cypress is now at 10.4 but the upgrade to 10x requires some migration so I thought I would ask if anyone can duplicate just in case the cause is something strange about my local env.

Here is my node info reported by Cypress > Settings

System Version 18.7.0
Node.js Path /Users/brandon/.asdf/installs/nodejs/18.7.0/bin/node

Screenshots

Screen Shot 2022-08-14 at 5 33 39 AM

Screen Shot 2022-08-14 at 5 38 25 AM

Redirection not handled while signing up via Oauth

Steps to recreate:

  1. Run the project locally.
  2. Sign up to Calendly via any new email, it redirects to calendly site and never redirects to the log in page/ dashboard.

This works perfectly well when I log in.

Can anyone help on how to solve this issue, where redirection is taken care of?

Getting npm start error

getUserInfo = async () => {
            ^

SyntaxError: Unexpected token =
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.