Git - Book
Naming Convention
In Java/Spring and TypeScript server running on Bun, the common naming convention is camel case. This means that variable and method names start with a lowercase letter and subsequent words are capitalized (e.g., myVariable
, myMethod()
).
In TypeScript/React Native, the common naming convention is pascal case. This means that variable and method names start with an uppercase letter and subsequent words are also capitalized (e.g., MyVariable
, MyMethod()
).
Spring Boot
- src: Contains the source code for the Spring Boot application.
- main: Contains the main application code.
- java: Contains the Java code files.
- com.example: Replace with the appropriate package name.
- config: Contains configuration classes.
- controller: Contains the REST controller classes.
- service: Contains the service classes.
- repository: Contains the repository classes.
- dto: Contains the data transfer object classes.
- exception: Contains custom exception classes.
- resources: Contains the resource files.
- application.properties: Contains the application-specific properties.
- static: Contains static files (e.g., CSS, JavaScript, images).
- templates: Contains HTML templates (if using server-side rendering).
- test: Contains the test code.
- java: Contains the Java test code files.
- com.example: Replace with the appropriate package name.
- controller: Contains the test classes for the REST controllers.
- service: Contains the test classes for the service classes.
- repository: Contains the test classes for the repository classes.
- util: Contains utility classes for testing.
- resources: Contains the resource files for testing.
Bun Server using TypeScript
- src: Contains the source code for the Bun Server.
- api: Contains the API-related code.
- controllers: Contains the controller classes.
- middlewares: Contains the middleware classes.
- models: Contains the model classes.
- routes: Contains the route files.
- config: Contains the configuration files.
- database.ts: Contains the database configuration.
- server.ts: Contains the server configuration.
- services: Contains the service classes.
- utils: Contains utility classes and functions.
- app.ts: Contains the main application file.
React Native using TypeScript
- src: Contains the source code for the React Native application.
- assets: Contains the static assets (e.g., images, fonts).
- components: Contains the reusable components.
- navigation: Contains the navigation-related code.
- screens: Contains the screen components.
- services: Contains the service classes.
- styles: Contains the style files.
- utils: Contains utility classes and functions.
- App.tsx: Contains the main application file.
Git Flow
Git flow
Git Hook