Play truco on truco.com, the best card game to play 1v1!
You can play it now right here. although the sever is hosted with a free account and takes a couple minutes to start if nobody is online.
Click the thumbnail above to see gameplay!
- Open your personal account
- Play online 1v1 matches with strangers
- Win games to increase your rating
- Climb up the global rankings (which will refresh everyday)
- Add your friends and challenge them
- Chat with your opponent as your play
- Check out the rules and the order of strength of the cards (for the newbies)
- Node + Express for the server
- Pusher for web sockets
- React + Tailwind for the frontend
- MongoDB (MongoAtlas) for the no-sql database
- Node: A asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications1.
- Express: Minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications2.
- React: A JavaScript library for building user interfaces3.
- Tailwind: A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup4.
- MongoDB: A fully-managed cloud database that handles all the complexity of deploying, managing, and healing your deployments on the cloud service provider of your choice (AWS , Azure, and GCP)5.
- Pusher: Pusher Channels is a hosted WebSockets(helps communication between client and server) solution for building powerful realtime interactive apps6.
(BETTER FOR DEVELOPMENT) Run two servers in two different terminals one for the backend and another one for the frontend. (click the links to see how)
Alternatively if you want to test a prod-like version of the app locally use the following commands (this integrates the frontend and backend together)
./run-locally.sh # LINUX. Runs the whole app in one prod-like local server
./run-locally.ps1 # WINDOWS. Runs the whole app in one prod-like local server
remove sudo if running on windows
optional
********************************************************************
#to check if docker is installed (linux)
docker --version
#to install docker if it isn't installed
Linux:
sudo snap install docker # version 20.10.24, or
sudo apt install docker.io # version 24.0.5-0ubuntu1~20.04.1
windows:
https://docs.docker.com/desktop/install/windows-install/
********************************************************************
sudo docker build -t truco-img .
sudo docker run -p 8080:8080 --name truco-app truco-img
# to stop container
sudo docker stop truco-app
# to start it again (once it's built)
sudo docker start truco-app
Thanks for passing by!