Skip to content

dumbanshm/gocrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoCrypt

A full-stack web application for covert messaging using a playable Go board. Built with React (Vite), Node.js/Express, and Firebase.

Features

  • Complete Go Game Engine: Full rule implementation with captures, ko rule, and suicide prevention
  • Interactive Game Board: 19x19 board with proper stone placement and move validation
  • Game Analysis: Move-by-move game review with SGF export functionality
  • Firebase Authentication: Email/password and Google sign-in
  • User Profiles: Customizable user profiles with unique handles
  • Covert Messaging: (Planned) Hidden message encoding within Go games
  • Modern UI/UX: Responsive design with smooth animations

Tech Stack

  • Frontend: React 18, Vite, Firebase Auth, Firestore
  • Backend: Node.js, Express, MongoDB (planned)
  • Authentication: Firebase Authentication
  • Database: Firebase Firestore
  • Styling: Inline styles with modern design patterns

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Firebase project with Authentication and Firestore enabled

Setup Instructions

1. Clone the Repository

git clone <your-repo-url>
cd gocrypt

2. Frontend Setup

cd frontend
npm install

3. Environment Configuration

Create a .env file in the frontend directory:

cp env.example .env

Fill in your Firebase configuration values:

VITE_FIREBASE_API_KEY=your_actual_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id

4. Backend Setup (Optional)

cd ../backend
npm install

Create a .env file in the backend directory:

MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
FIREBASE_PROJECT_ID=your_firebase_project_id

5. Start Development Servers

Frontend:

cd frontend
npm run dev

Backend:

cd backend
npm start

Firebase Setup

  1. Create a new Firebase project at Firebase Console
  2. Enable Authentication (Email/Password and Google providers)
  3. Enable Firestore Database
  4. Get your web app configuration from Project Settings
  5. Add the configuration values to your .env file

Project Structure

gocrypt/
├── frontend/                 # React frontend
│   ├── src/
│   │   ├── components/       # React components
│   │   ├── pages/           # Page components
│   │   ├── engine/          # Go game engine
│   │   ├── firebase/        # Firebase configuration
│   │   └── utils/           # Utility functions
│   ├── public/              # Static assets
│   └── package.json
├── backend/                 # Node.js backend
│   ├── routes/              # API routes
│   ├── controllers/         # Route controllers
│   ├── models/              # Database models
│   └── middleware/          # Express middleware
└── README.md

Game Features

  • Complete Go Rules: Captures, ko rule, suicide prevention
  • Move Validation: Legal move checking with proper rule enforcement
  • Game State Management: Turn tracking, game ending conditions
  • History Tracking: Complete move history with analysis mode
  • SGF Export: Standard SGF file generation and download
  • Board Analysis: Move-by-move game review functionality

Authentication Flow

  1. Users can sign in with email/password or Google
  2. New users are prompted to create a profile with name and unique handle
  3. Profiles are stored in Firestore under users/{uid}
  4. Protected routes require authentication

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security Notes

  • Never commit .env files or Firebase configuration with real values
  • Use environment variables for all sensitive configuration
  • Firebase API keys are safe to expose in client-side code (they have domain restrictions)

License

This project is licensed under the MIT License.

Acknowledgments

  • Built with modern web technologies
  • Inspired by the ancient game of Go
  • Special thanks to the Go/Baduk community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published