Developer Setup Guide¶
Welcome to the Developer Setup Guide for the Rplex product. This guide provides step-by-step instructions for configuring your development environment, assuming you have a verified GitHub account and have been added to the relevant GitHub organization and projects.
Prerequisites¶
Before proceeding, ensure the following: - You have a verified GitHub account. - You have been added to the GitHub organization (e.g., nextthink-systems) and the project: GitHub Project. - You have access to the necessary tools and services listed below.
Setting Up Git Personal Access Token (PAT) for Authentication¶
Steps to Create and Use a Git PAT¶
-
Log in to GitHub: Go to GitHub and sign in to your account.
-
Access Token Settings: Click on your profile picture in the upper-right corner and select Settings. In the left sidebar, click Developer settings. In the left sidebar again, click Personal Access Tokens.
- Generate New Token: Click on Generate new token. Give your token a descriptive name (e.g., "Git push access"). Select the scopes or permissions you need. For pushing to repositories, you will need repo (full control of private repositories).
- Generate and Copy Token: Click Generate token. Copy the token to your clipboard. Note: You won't be able to see this token again, so store it securely. Step 2: Configure Git to Use the Token for Authentication To authenticate Git operations with your token, you need to update the URL of your repository to include the token. This can be done in several ways:
Method 1: Using Git Command Line 1. Navigate to Your Repository:
Open your terminal or command prompt. Change the directory to your local repository: cd path/to/your/repo. 2. Update Remote URL:
Update the remote URL to include your token:
git remote set-url origin https://
Method 2: Using Git Credential Manager (Recommended) 1. Install Git Credential Manager: Ensure you have Git Credential Manager installed. It's bundled with Git for Windows and can be installed separately for other platforms.
- Configure Credential Manager:
Open your terminal or command prompt and configure Git to use the credential manager:
git config --global credential.helper manager-core 3. Push to Repository:
When you perform a git push, Git will prompt you to enter your username and personal access token. Enter your GitHub username and paste the token as the password.
Method 3: Using SSH (Alternative Approach) For users who prefer not to include their tokens in URLs or handle tokens directly, SSH keys offer a robust alternative.
- Generate SSH Key: If you haven't already, generate an SSH key:
ssh-keygen -t ed25519 -C "[email protected]" Follow the prompts to save the key and set a passphrase.
Add SSH Key to GitHub:
-
Copy the SSH key to your clipboard: cat ~/.ssh/id_ed25519.pub Go to GitHub, navigate to Settings > SSH and GPG keys, and click New SSH key. Paste your key and save.
-
Update Remote URL: Change the remote URL to use SSH:
git remote set-url origin [email protected]:username/repository.git Step 3: Test Your Configuration Push to Repository:
Make a change in your repository, commit it, and try to push:
git add . git commit -m "Test commit" git push origin main If everything is configured correctly, your push should succeed without prompting for credentials.
Why Use a Personal Access Token (PAT)? A Personal Access Token (PAT) is a secure method of authenticating with GitHub without using your password. It’s essentially a replacement for your password when performing Git operations over HTTPS. Here are some reasons why PATs are recommended:
Security: PATs are more secure than passwords because they can be limited in scope and expiration. This minimizes security risks if the token gets exposed. Granular Permissions: PATs allow you to define the scope of permissions, such as access to repositories, issues, or workflow actions. Long-Term Solution: Unlike passwords, PATs don't expire as quickly and can be refreshed or revoked as needed.
Development Tools and Resources¶
Access the following tools and resources for development, CI/CD, and collaboration. These are hosted internally and accessible via the provided links (ensure you are on the VPN or have appropriate access).
- Logging and Telemetry Dashboard: rhlab-grafana.htsvsystems.com - Monitor logs and metrics.
- Jenkins: rhlab-jenkins.htsvsystems.com - CI/CD pipelines.
- Local MicroK8s Cluster: rhlab-mk8s.htsvsystems.com - Kubernetes cluster for local development.
- GitHub Project: https://github.com/orgs/nextthink-systems/projects/1 - Project management and issue tracking.
- Nexus: rhlab-nexus.htsvsystems.com - Artifact repository.
- Vault: vault.htsvsystems.com - Secrets management.
- Excalidraw: rhlab-excalidraw.htsvsystems.com - Collaborative diagramming.
- Draw.io: rhlab-drawio.htsvsystems.com - Diagram creation.
- Paperless: rhlab-paperless.htsvsystems.com - Document management.
- MkDocs Documentation: rhlab-docs.htsvsystems.com - This documentation site.
- Keycloak: rhlab-keycloak.htsvsystems.com - Identity and access management (GitHub OAuth configured).
Hosting and Collaboration Recommendations for SaaS Product Development¶
For SaaS product development and collaboration across geographical locations, consider the following best practices and improvements:
Hosting Recommendations¶
- Current Setup: The documentation is self-hosted on MkDocs at
rhlab-docs.htsvsystems.com. This works well for internal access but may have latency issues for global teams. - Better Alternatives:
- GitHub Pages: Host the MkDocs site on GitHub Pages for free, with global CDN via GitHub's infrastructure. This improves accessibility and reduces load on internal servers. Use GitHub Actions for automated builds and deployments.
- Vercel or Netlify: For enhanced performance, deploy to Vercel or Netlify. These platforms offer fast global CDNs, automatic HTTPS, and integrations with GitHub for seamless CI/CD. Ideal for SaaS docs that need high availability.
- Cloud Providers: Use AWS S3 + CloudFront, Azure Static Web Apps, or GCP Cloud Storage for scalable, secure hosting. This is suitable for enterprise SaaS with compliance needs.
- Benefits for Global Collaboration: Reduced latency, better uptime, and easier access for remote developers without VPN requirements.
Collaboration Improvements¶
- Version Control and Code Collaboration: Leverage GitHub for all code, docs, and issues. Use branches, PRs, and code reviews for collaborative development.
- Communication Tools: Integrate with Slack, Microsoft Teams, or Discord for real-time communication. Use GitHub Discussions for async collaboration.
- Access Management: Utilize Keycloak for SSO across tools, ensuring secure access for distributed teams.
- CI/CD Integration: Automate deployments using Jenkins or GitHub Actions to keep environments in sync across locations.
- Security for Remote Access: For self-hosted tools, implement VPN (e.g., WireGuard) or zero-trust models. Consider cloud-hosted alternatives for better global performance.
Template and Onboarding Experience Improvements¶
- Multiple Sections: Structure the guide with clear sections (e.g., Prerequisites, Setup Steps, Tools, Recommendations) for better readability.
- Side Panel/Navigation: Use MkDocs Material theme with navigation sidebars, tabs, and a table of contents for easy browsing. Add search functionality.
- Interactive Elements: Include collapsible sections, code snippets with copy buttons, and embedded videos/links for tutorials.
- Progressive Disclosure: Start with essentials, then link to advanced topics. Use admonitions (notes, warnings) for important tips.
- Feedback Mechanism: Add a "Contribute" or "Feedback" section to encourage improvements.
- Mobile-Friendly: Ensure the theme is responsive for developers accessing from various devices.
Contributing¶
We welcome contributions to improve this guide. If you have suggestions or updates, please submit a pull request on the GitHub repository.
Contact Us¶
For questions or support, contact the development team at [email protected].