当前位置: 首页 > 软件库 > 云计算 > Serverless 系统 >

setwithfriends

授权协议 MIT License
开发语言 JavaScript
所属分类 云计算、 Serverless 系统
软件类型 开源软件
地区 不详
投 递 者 洪浩
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Set with Friends

Logo

This is the source code for Set with Friends, anonline, multiplayer implementation of the real-time card gameSet. Your goal is to findtriplets of cards that follow a certain pattern as quickly as possible.

Technical Details

This app was built on a serverless stack primarily using theFirebase Realtime Database, alongwith Firebase Cloud Functions formore complex or sensitive operations. The frontend was built withReact, with components fromMaterial UI.

Code for the frontend is written in JavaScript and located in the src/ folder,while serverless functions are written in TypeScript and located in thefunctions/ folder.

The latest development version of the code is on the main branch. We useGitHub Actions to automate our build and deployment process on Netlify, after anew release is created with version number vA.B.C.

Contributing

This game is in active development, and we welcome contributions from developersof all backgrounds. I would recommend talking to us on Discord (link above) orsubmitting an issue if you want to see a new feature added. If you would like tohelp by contributing code, that's great – we would be happy to set up a time tochat!

To build the site for development:

  • Install Node.js 14 and npm 7.
  • Run npm install -g firebase-tools to globally install the Firebase CLI.
  • Run npm install in the root folder to get dependencies.
  • Run npm install in the functions folder.
  • To start the project, run npm run dev. This runs a script, which isresponsible for doing several things concurrently:
    • Build the TypeScript cloud functions in watch mode.
    • Start the Firebase Local Emulator Suite.
    • Start the frontend with React Fast Refresh enabled.

You should also be able to access the Emulator UI at http://localhost:4000,which contains useful information and allows you to inspect/modify the databaseduring development. Changes to client code in src should be immediatelyvisible, as well as changes to code in functions.

Please make all pull requests with new features or bugfixes to the mainbranch. We are formatting code using Prettier, so youshould run npm run format on your code before making a pull request.

Deployment

As mentioned above, the latest changes to the main branch are deployedautomatically to Netlify using the npm run build script. If you try to runthis locally, it will not work due to protections on the production database.Instead, you can preview a release build configured to connect to the localemulator suite using the npm run build:dev script.

The other parts of the app (serverless functions, database rules) are deployedto production using GitHub Actions on the main branch. Thestaging environment gets automatic deploypreviews when CI on the main branch passes. It is useful for seeing the latestversion of the app and making sure that nothing is broken before releasing toproduction.

License

Built by Eric Zhang andCynthia Du.

All source code is available under the MIT License. We are notaffiliated with Set Enterprises, Inc., or the SET® card game.